Using these endpoints you can handle registration, posting, and retrieval of refunds associated with original transaction account information.
Token.io Refunds API (1.0.2)
Token.io Payments REST API 2.0
Token.io Support: support@token.io
The Token.io Payments API enables you to connect securely with banks. Using our API you can handle registration, posting, and retrieval of refunds associated with original transaction account information.
For more information see our developer documentation.
Request
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).
- SwaggerHub API Auto Mockinghttps://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/refund/registrations
- Token.io API serverhttps://api.token.io/v2/refund/registrations
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/refund/registrations \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"bnpp": {
"appId": "myAppId",
"appSecret": "myAppSecret",
"signingKeyId": "mySigningKeyId",
"tokenSigningKeyId": "123e4567-e89b-12d3-a456-426614174000",
"debtor": {
"iban": "GB82WEST12345698765432",
"bic": "mybic",
"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": { … } } }
- SwaggerHub API Auto Mockinghttps://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/refund/registrations/{registrationId}
- Token.io API serverhttps://api.token.io/v2/refund/registrations/{registrationId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/refund/registrations/your registration id' \
-H 'Authorization: YOUR_API_KEY_HERE'{ "registration": { "id": "123e4567-e89b-12d3-a456-426614174000", "createdDateTime": "2017-04-05T10:43:07.000+00:00", "product": "REFUND", "bnpp": { … } } }
- SwaggerHub API Auto Mockinghttps://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/refund/registrations/{registrationId}
- Token.io API serverhttps://api.token.io/v2/refund/registrations/{registrationId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/refund/registrations/your registration id' \
-H 'Authorization: YOUR_API_KEY_HERE'- SwaggerHub API Auto Mockinghttps://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/refunds
- Token.io API serverhttps://api.token.io/v2/refunds
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/refunds?limit=10&offset=string&startDate=2010-01-01&endDate=2010-01-01' \
-H 'Authorization: YOUR_API_KEY_HERE'{ "refunds": [ { … } ], "paging": { "limit": 0, "offset": "string" } }
Request
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.
The Initiation payload for the refund.
The ISO 4217 three letter currency code.
The original payment id from Token.io payments/transfers. This is required to initiate a refund. Token.io will check the original payment for the refund validation.
ASPSP's payment service to be used for making a payment.
- SwaggerHub API Auto Mockinghttps://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/refunds
- Token.io API serverhttps://api.token.io/v2/refunds
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/refunds \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"initiation": {
"description": "refund for some reason",
"refId": "myRefId",
"amount": {
"value": "10.23",
"currency": "EUR"
},
"originalPaymentId": "t:sdsds:sdsd",
"registrationId": "regId",
"localInstrument": "SEPA_INSTANT",
"signature": "MEUCIQDx..."
}
}'{ "refund": { "id": "rf:12345abcd:abcd", "bankTransactionId": "1231423", "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": "ACPC", "statusReasonInformation": "The payment is settled on debtor side.", "initiation": { … } } }
Request
Returns the provider payload the merchant has to sign before calling POST /refunds. Stateless: no refund is created and nothing is persisted by this call.
The merchant signs the returned payloadToSign and submits the signature back in the signature field of the initiation on the subsequent POST /refunds call.
The Initiation payload for the refund.
The ISO 4217 three letter currency code.
The original payment id from Token.io payments/transfers. This is required to initiate a refund. Token.io will check the original payment for the refund validation.
ASPSP's payment service to be used for making a payment.
- SwaggerHub API Auto Mockinghttps://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/refunds/signature
- Token.io API serverhttps://api.token.io/v2/refunds/signature
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/refunds/signature \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"initiation": {
"description": "refund for some reason",
"refId": "myRefId",
"amount": {
"value": "10.23",
"currency": "EUR"
},
"originalPaymentId": "t:sdsds:sdsd",
"registrationId": "regId",
"localInstrument": "SEPA_INSTANT",
"signature": "MEUCIQDx..."
}
}'{ "payloadToSign": "eyJncm91cEhlYWRlciI6e319" }
- SwaggerHub API Auto Mockinghttps://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/refunds/{id}
- Token.io API serverhttps://api.token.io/v2/refunds/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/refunds/your refund id' \
-H 'Authorization: YOUR_API_KEY_HERE'{ "refund": { "id": "rf:12345abcd:abcd", "bankTransactionId": "1231423", "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": "ACPC", "statusReasonInformation": "The payment is settled on debtor side.", "initiation": { … } } }
- SwaggerHub API Auto Mockinghttps://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/transfers/{id}/refunds
- Token.io API serverhttps://api.token.io/v2/transfers/{id}/refunds
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/transfers/your transfer id/refunds?limit=10&offset=string' \
-H 'Authorization: YOUR_API_KEY_HERE'{ "refunds": [ { … } ], "paging": { "limit": 0, "offset": "string" } }
- SwaggerHub API Auto Mockinghttps://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/secrets/upload/key-and-certificate
- Token.io API serverhttps://api.token.io/v2/secrets/upload/key-and-certificate
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://virtserver.swaggerhub.com/token/token-refund-rest-api-bnpp/1.0.2/secrets/upload/key-and-certificate \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"upload": {
"keyAndCertificate": {
"privateKey": "xxxxxxxx",
"certificate": "xxxxx",
"certificateName": "QWAC_PSDGB-FCA-795904"
}
}
}'{ "keyId": "XXXXXXX" }