These endpoints allow you to handle registration, posting, and retrieval of refunds associated with original transaction account information.
The POST /refund/registrations
endpoint registers a debtor account for refund processing. If the bank or provider returns any additional credentials for further refund payments, Token.io will store them in the Hardware Security Module (HSM).
object (BnppRegistrationPayload_bnpp) |
Successful response
The client specified an invalid argument
The authorisation information is missing or invalid
Permission to access this endpoint is denied
The requested entity, such as a payment, was not found
Too many requests
An unexpected or internal server error
The operation was not implemented
Service is unavailable
Gateway has timed out
{- "bnpp": {
- "appId": "myAppId",
- "appSecret": "myAppSecret",
- "signingKeyId": "mySigningKeyId",
- "tokenSigningKeyId": "123e4567-e89b-12d3-a456-426614174000",
- "debtor": {
- "iban": "GB29NWBK60161331926819",
- "bic": "BOFIIE2D",
- "name": "John Smith",
- "ultimateDebtorName": "John Smith"
}
}
}
{- "registration": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "createdDateTime": "2017-04-05T10:43:07.000+00:00",
- "product": "REFUND",
- "bnpp": {
- "appId": "myAppId",
- "appSecret": "myAppSecret",
- "signingKeyId": "mySigningKeyId",
- "tokenSigningKeyId": "123e4567-e89b-12d3-a456-426614174000",
- "debtor": {
- "iban": "GB29NWBK60161331926819",
- "bic": "BOFIIE2D",
- "name": "John Smith",
- "ultimateDebtorName": "John Smith"
}
}
}
}
The GET /refund/registrations/{registrationId}
endpoint retrieves the current refund registration information by registration id.
Successful response
The client specified an invalid argument
The authorisation information is missing or invalid
Permission to access this endpoint is denied
The requested entity, such as a payment, was not found
Too many requests
An unexpected or internal server error
The operation was not implemented
Service is unavailable
Gateway has timed out
{- "registration": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "createdDateTime": "2017-04-05T10:43:07.000+00:00",
- "product": "REFUND",
- "bnpp": {
- "appId": "myAppId",
- "appSecret": "myAppSecret",
- "signingKeyId": "mySigningKeyId",
- "tokenSigningKeyId": "123e4567-e89b-12d3-a456-426614174000",
- "debtor": {
- "iban": "GB29NWBK60161331926819",
- "bic": "BOFIIE2D",
- "name": "John Smith",
- "ultimateDebtorName": "John Smith"
}
}
}
}
The DELETE /refund/registrations/{registrationId}
deletes refund registration information by registration id.
Successful response
The client specified an invalid argument
The authorisation information is missing or invalid
Permission to access this endpoint is denied
The requested entity, such as a payment, was not found
Too many requests
An unexpected or internal server error
The operation was not implemented
Service is unavailable
Gateway has timed out
{ }
The POST /refunds
endpoint initiates a refund. After the refund is settled, the refund status of the original transfer will be updated.
The debtor field can be optional if you're using the debtor in registration. The creditor field can be optional if the information is available in the original payment.
required | object (RefundInitiation) The Initiation payload for the refund. |
Successful response
The client specified an invalid argument
The authorization information is missing or invalid
Permission to access this endpoint is denied
The requested entity, such as a payment, was not found
Too many requests
An unexpected or internal server error
The operation was not implemented
Service is unavailable
Gateway has timed out
{- "initiation": {
- "description": "refund for some reason",
- "refId": "9htio4a1sp2akdr1aa",
- "amount": {
- "value": "10.23",
- "currency": "EUR"
}, - "originalPaymentId": "t:sdsds:sdsd",
- "registrationId": "regId",
- "localInstrument": "SEPA_INSTANT",
- "onBehalfOfId": "c5a863bc-86f2-4418-a26f-25b24c7983c7",
- "corporateApiDebtor": {
- "accountId": "a12345"
}
}
}
{- "refund": {
- "id": "rf:12345abcd:abcd",
- "bankTransactionId": "2UhwCZ3BMaEcAUK8bZdukor7NL4tH6TBuu6aJMp5KKfX:5zKcENpV",
- "memberId": "m:123456abcd:abcd",
- "createdDateTime": "2017-04-05T10:43:07.000+00:00",
- "updatedDateTime": "2017-04-05T10:45:07.000+00:00",
- "status": "INITIATION_COMPLETED",
- "bankPaymentStatus": "ACCP",
- "statusReasonInformation": "The payment is settled on debtor side.",
- "initiation": {
- "description": "refund for some reason",
- "refId": "9htio4a1sp2akdr1aa",
- "amount": {
- "value": "10.23",
- "currency": "EUR"
}, - "originalPaymentId": "t:sdsds:sdsd",
- "registrationId": "regId",
- "localInstrument": "SEPA_INSTANT",
- "debtor": {
- "iban": "GB29NWBK60161331926819",
- "bic": "BOFIIE2D",
- "name": "John Smith",
- "ultimateDebtorName": "John Smith",
- "address": {
- "addressLine": [
- "The Coach House"
], - "streetName": "221B",
- "buildingNumber": "2C",
- "postCode": "TR26 1EZ",
- "townName": "Saint Ives",
- "state": "Cornwall",
- "district": "string",
- "country": "GB"
}
}, - "creditor": {
- "iban": "GB29NWBK60161331926819",
- "bic": "BOFIIE2D",
- "name": "Customer Inc.",
- "ultimateCreditorName": "Customer Inc.",
- "address": {
- "addressLine": [
- "The Coach House"
], - "streetName": "221B",
- "buildingNumber": "2C",
- "postCode": "TR26 1EZ",
- "townName": "Saint Ives",
- "state": "Cornwall",
- "district": "string",
- "country": "GB"
}, - "bankName": "string"
}
}
}
}
The GET /refunds
endpoint retrieves a complete or filtered list of refunds.
Successful response
The client specified an invalid argument
The authorization information is missing or invalid
Permission to access this endpoint is denied
The requested entity, such as a payment, was not found
Too many requests
An unexpected or internal server error
The operation was not implemented
Service is unavailable
Gateway has timed out
{- "refunds": [
- {
- "id": "rf:12345abcd:abcd",
- "bankTransactionId": "2UhwCZ3BMaEcAUK8bZdukor7NL4tH6TBuu6aJMp5KKfX:5zKcENpV",
- "memberId": "m:123456abcd:abcd",
- "createdDateTime": "2017-04-05T10:43:07.000+00:00",
- "updatedDateTime": "2017-04-05T10:45:07.000+00:00",
- "status": "INITIATION_COMPLETED",
- "bankPaymentStatus": "ACCP",
- "statusReasonInformation": "The payment is settled on debtor side.",
- "initiation": {
- "description": "refund for some reason",
- "refId": "9htio4a1sp2akdr1aa",
- "amount": {
- "value": "10.23",
- "currency": "EUR"
}, - "originalPaymentId": "t:sdsds:sdsd",
- "registrationId": "regId",
- "localInstrument": "SEPA_INSTANT",
- "debtor": {
- "iban": "GB29NWBK60161331926819",
- "bic": "BOFIIE2D",
- "name": "John Smith",
- "ultimateDebtorName": "John Smith",
- "address": {
- "addressLine": [
- "The Coach House"
], - "streetName": "221B",
- "buildingNumber": "2C",
- "postCode": "TR26 1EZ",
- "townName": "Saint Ives",
- "state": "Cornwall",
- "district": "string",
- "country": "GB"
}
}, - "creditor": {
- "iban": "GB29NWBK60161331926819",
- "bic": "BOFIIE2D",
- "name": "Customer Inc.",
- "ultimateCreditorName": "Customer Inc.",
- "address": {
- "addressLine": [
- "The Coach House"
], - "streetName": "221B",
- "buildingNumber": "2C",
- "postCode": "TR26 1EZ",
- "townName": "Saint Ives",
- "state": "Cornwall",
- "district": "string",
- "country": "GB"
}, - "bankName": "string"
}
}
}
], - "paging": {
- "limit": 0,
- "offset": "LerV6Jmex"
}
}
The GET /refunds/{id}
endpoint retrieves a given refund.
Successful response
The client specified an invalid argument
The authorization information is missing or invalid
Permission to access this endpoint is denied
The requested entity, such as a payment, was not found
Too many requests
An unexpected or internal server error
The operation was not implemented
Service is unavailable
Gateway has timed out
{- "refund": {
- "id": "rf:12345abcd:abcd",
- "bankTransactionId": "2UhwCZ3BMaEcAUK8bZdukor7NL4tH6TBuu6aJMp5KKfX:5zKcENpV",
- "memberId": "m:123456abcd:abcd",
- "createdDateTime": "2017-04-05T10:43:07.000+00:00",
- "updatedDateTime": "2017-04-05T10:45:07.000+00:00",
- "status": "INITIATION_COMPLETED",
- "bankPaymentStatus": "ACCP",
- "statusReasonInformation": "The payment is settled on debtor side.",
- "initiation": {
- "description": "refund for some reason",
- "refId": "9htio4a1sp2akdr1aa",
- "amount": {
- "value": "10.23",
- "currency": "EUR"
}, - "originalPaymentId": "t:sdsds:sdsd",
- "registrationId": "regId",
- "localInstrument": "SEPA_INSTANT",
- "debtor": {
- "iban": "GB29NWBK60161331926819",
- "bic": "BOFIIE2D",
- "name": "John Smith",
- "ultimateDebtorName": "John Smith",
- "address": {
- "addressLine": [
- "The Coach House"
], - "streetName": "221B",
- "buildingNumber": "2C",
- "postCode": "TR26 1EZ",
- "townName": "Saint Ives",
- "state": "Cornwall",
- "district": "string",
- "country": "GB"
}
}, - "creditor": {
- "iban": "GB29NWBK60161331926819",
- "bic": "BOFIIE2D",
- "name": "Customer Inc.",
- "ultimateCreditorName": "Customer Inc.",
- "address": {
- "addressLine": [
- "The Coach House"
], - "streetName": "221B",
- "buildingNumber": "2C",
- "postCode": "TR26 1EZ",
- "townName": "Saint Ives",
- "state": "Cornwall",
- "district": "string",
- "country": "GB"
}, - "bankName": "string"
}
}
}
}
The GET /transfers/{id}/refunds
endpoint retrieves all refunds associated with a given transfer.
Successful response
The client specified an invalid argument
The authorization information is missing or invalid
Permission to access this endpoint is denied
The requested entity, such as a payment, was not found
Too many requests
An unexpected or internal server error
The operation was not implemented
Service is unavailable
Gateway has timed out
{- "refunds": [
- {
- "id": "rf:12345abcd:abcd",
- "bankTransactionId": "2UhwCZ3BMaEcAUK8bZdukor7NL4tH6TBuu6aJMp5KKfX:5zKcENpV",
- "memberId": "m:123456abcd:abcd",
- "createdDateTime": "2017-04-05T10:43:07.000+00:00",
- "updatedDateTime": "2017-04-05T10:45:07.000+00:00",
- "status": "INITIATION_COMPLETED",
- "bankPaymentStatus": "ACCP",
- "statusReasonInformation": "The payment is settled on debtor side.",
- "initiation": {
- "description": "refund for some reason",
- "refId": "9htio4a1sp2akdr1aa",
- "amount": {
- "value": "10.23",
- "currency": "EUR"
}, - "originalPaymentId": "t:sdsds:sdsd",
- "registrationId": "regId",
- "localInstrument": "SEPA_INSTANT",
- "debtor": {
- "iban": "GB29NWBK60161331926819",
- "bic": "BOFIIE2D",
- "name": "John Smith",
- "ultimateDebtorName": "John Smith",
- "address": {
- "addressLine": [
- "The Coach House"
], - "streetName": "221B",
- "buildingNumber": "2C",
- "postCode": "TR26 1EZ",
- "townName": "Saint Ives",
- "state": "Cornwall",
- "district": "string",
- "country": "GB"
}
}, - "creditor": {
- "iban": "GB29NWBK60161331926819",
- "bic": "BOFIIE2D",
- "name": "Customer Inc.",
- "ultimateCreditorName": "Customer Inc.",
- "address": {
- "addressLine": [
- "The Coach House"
], - "streetName": "221B",
- "buildingNumber": "2C",
- "postCode": "TR26 1EZ",
- "townName": "Saint Ives",
- "state": "Cornwall",
- "district": "string",
- "country": "GB"
}, - "bankName": "string"
}
}
}
], - "paging": {
- "limit": 0,
- "offset": "LerV6Jmex"
}
}
The POST /secrets/upload/key-and-certificate
endpoint uploads a private key and certificate. This is required if you process refunds through your own system and not through the Dashboard.
keyAndCertificate (object) or keys (object) |
Successful response
The client specified an invalid argument
The authorization information is missing or invalid
Permission to access this endpoint is denied
The requested entity, such as a payment, was not found
Too many requests
An unexpected or internal server error
The operation was not implemented
Service is unavailable
Gateway has timed out
{- "upload": {
- "keyAndCertificate": {
- "privateKey": "xxxxxxxx",
- "certificate": "xxxxx",
- "certificateName": "QWAC_PSDGB-FCA-795904"
}
}
}
{- "keyId": "XXXXXXX"
}