These endpoints enable you to make v2 single immediate payments and future dated payments using the redirect, embedded and decoupled flows.
Token.io's Open Banking API for TPPs
Token.io's Open Banking API
Token.io Support: support.token.io
The Token.io Open Banking API enables you to connect securely with banks for a range of services.
Using our API you can:
- provide authorized access to an authenticated user's account information
- get information on specific banks
- initiate authorization with a user-selected bank
- initate and track single immediate payments and future dated payments
- use variable recurring payments (VRP) to grant long-held consents to Payment Initiation Service Providers (PISPs) to initiate series of payments from users' bank accounts
- carry out settlements, payments and refunds using our settlement accounts
For more information see our developer documentation.
Request
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.
The Initiation payload for the refund.
The TPP-generated reference identifier for the token. This is not to be confused with the requestId. The refId maps to the tppRefId in the bank's consentRequest. This is needed to match/verify the originating token request with the bank's consent request.
We recommend that the refId should not contain special characters (the allowed characters are the 26-letter Latin alphabet, the numerical digits from 0-9 and the hyphen '-'). This field should not exceed 18 characters in length.
The transaction amount and currency.
The transaction amount with up to four digits after the decimal point.
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.
The bank's payment service to be used for making a payment.
The onBehalfOfId is validated against the sub-TPP id of the member before initiating the refund. This field is mandatory for unregulated TPPs.
https://api.token.io/refunds
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.token.io/refunds \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"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": { … } } }
Lower bound for a refund creation date in the format 'YYYY-MM-DD' (UTC time zone). If specified, only refunds created at or after the given date will be returned.
Upper bound for a refund creation date in the format 'YYYY-MM-DD' (UTC time zone). If specified, only refunds created at or before the given date will be returned.
Filters refunds by their ids - returns only refunds with ids listed in this parameter.
Filters refunds by their statuses - returns only refunds with statuses listed in this parameter.
Invert statuses query - returns only refunds with statuses not listed in the statuses parameter.
Filters refunds by their refId values - returns only refunds with refIds listed in this parameter.
Returns refunds in a partial format - with only id and status fields populated.
Filters payouts by their onBehalfOfId values - returns only payouts with the onBehalfOfId values specified in this parameter. This field is mandatory for unregulated TPPs.
https://api.token.io/refunds
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.token.io/refunds?limit=10&offset=LerV6Jmex&startDate=2010-01-01&endDate=2010-01-01&ids=rf%3A4QExXrhKTxfShBdcTeqFabqJJhUF%3A2gFUX1NDgpN%2Crf%3AN5cJDFsQzVca3Qvr8kQocgEnjgX%3A2gFUX1NEdYA&invertIds=true&statuses=INITIATION_COMPLETED%2CINITIATION_REJECTED&invertStatuses=true&refIds=ShBdcTeqFabqJJhUF%2CN5cJDFsQzVca3Q&partial=true&onBehalfOfIds=c5a863bc-86f2-4418-a26f-25b24c7983c7%2C6f34h397-b29h-23b0-s30g-hkd0d2dk4k1s' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "refunds": [ { … } ], "paging": { "limit": 0, "offset": "LerV6Jmex" } }
https://api.token.io/refunds/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.token.io/refunds/your refund id' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "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": { … } } }
https://api.token.io/transfers/{id}/refunds
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.token.io/transfers/your transfer id/refunds?limit=10&offset=LerV6Jmex' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "refunds": [ { … } ], "paging": { "limit": 0, "offset": "LerV6Jmex" } }
Webhooks
These endpoints configure, retrieve and remove webhooks. See Webhooks for more details.