Process payments with Ryft: authorizations, voids, captures, refunds etc.
- Create a link for a sub account to authorize their account
Ryft Payment API (1.1.0)
Ryft provides a collection of APIs that you can use to accept and process payments + marketplace functionality (payouts). We have a testing environment called sandbox, which you can sign up for to test API calls without affecting live data.
When you sign up for an account, you are given a secret and public API key pair. You authenticate with our API by providing the appropriate key in the request Authorization header. Never share your secret keys. Keep them guarded and secure.
Public keys should only be used in JavaScript or native applications. This key is solely used to identify the partner making requests. Supply this key in the Authorization header.
Your secret key should always be supplied in the Authorization header. Make sure this key is stored securely on your backend and never surfaced client-side.
We use rate limiting on a per-user basis to protect our APIs against abuse. Our Sandbox environment is limited to 5 requests per second. Our production environment is limited to 50 requests per second.
We also allow a brief burst above this limit to accommodate a sudden increase in traffic.
If you exceed the above quota then the API will respond with a 429 status code and you will need to retry the API call (we recommend implementing a retry policy with an exponential back-off).
Events
Events are persisted throughout the lifecycle of a payment/action as you use our API. We use events to notify you when something important happens in your account (or a linked sub account). The most commonly used event occurs when a payment is captured, in which case we persist a PaymentSession.captured event and then (optionally) send it to any webhooks you have registered that are listening for that event type.
Note that if you are taking payments as a platform (for sub accounts), events are saved against the sub account accountId, but will be sent to any webhooks that your account has configured.
The main email address for the sub account.
Required if onboardingFlow is Hosted and you are not supplying the 'entityType', otherwise you can supply this in the 'business'/'individual' block. Not required if onboardingFlow is NonHosted - any value supplied will be ignored.
use this parameter to attach key-value data to the account. These will be sent with any associated account events on your webhooks. You can have a maximum of 5 pieces of metadata.
- Sandbox environmmenthttps://sandbox-api.ryftpay.com/v1/accounts
- Production environmenthttps://api.ryftpay.com/v1/accounts
- cURL
- Node
- Python
curl -i -X POST \
https://sandbox-api.ryftpay.com/v1/accounts \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"email": "test@example.com"
}'The account was created successfully
A flag to determine whether or not the account is frozen. We may temporarily mark an account as frozen if we detect any potential fraudulent activity. Payments can still be taken however payouts will be disabled, contact us to resolve the issue.
use this parameter to attach key-value data to the account. These will be sent with any associated account events on your webhooks. You can have a maximum of 5 pieces of metadata.
The epoch timestamp (seconds) when the account was created
A list of actions required by the user when the status is 'ActionRequired', each accompanied by a description. DEPRECATED - if you wish to determine if actions are required before payouts can be sent out, check: - if frozen is true on this response - if verification.status is Required on this response - if status is Invalid on any payout methods under /v1/accounts/{id}/payout-methods
{ "id": "ac_b83f2653-06d7-44a9-a548-5825e8186004", "type": "Sub", "status": "ActionRequired", "actionsRequired": [ { … } ], "frozen": false, "email": "test@ryftpay.com", "onboardingFlow": "Hosted", "entityType": "Business", "business": { "name": "Ryft LTD", "type": "Corporation", "registrationNumber": "12345678", "registrationDate": "1990-01-20", "registeredAddress": { … }, "contactEmail": "contact@test.com", "phoneNumber": "+447900000000", "tradingName": "Ryft Computer Parts Ltd", "tradingAddress": { … }, "tradingCountries": [ … ], "websiteUrl": "https://www.example.com", "documents": [ … ] }, "individual": { "firstName": "Fred", "middleNames": "David", "lastName": "Jones", "email": "fred.jones@example.com", "dateOfBirth": "1990-01-20", "countryOfBirth": "GB", "gender": "Male", "nationalities": [ … ], "address": { … }, "phoneNumber": "+447900000000", "documents": [ … ] }, "verification": { "status": "Required", "requiredFields": [ … ], "requiredDocuments": [ … ], "errors": [ … ], "persons": { … } }, "metadata": { "accountId": "1" }, "settings": { "payouts": { … } }, "capabilities": { "visaPayments": { … }, "mastercardPayments": { … }, "amexPayments": { … }, "inPersonPayments": { … } }, "termsOfService": { "acceptance": { … } }, "createdTimestamp": 1470989538 }
- Sandbox environmmenthttps://sandbox-api.ryftpay.com/v1/accounts/{id}
- Production environmenthttps://api.ryftpay.com/v1/accounts/{id}
- cURL
- Node
- Python
curl -i -X GET \
https://sandbox-api.ryftpay.com/v1/accounts/ac_b83f2653-06d7-44a9-a548-5825e8186004 \
-H 'Authorization: YOUR_API_KEY_HERE'The account was retrieved successfully
A flag to determine whether or not the account is frozen. We may temporarily mark an account as frozen if we detect any potential fraudulent activity. Payments can still be taken however payouts will be disabled, contact us to resolve the issue.
use this parameter to attach key-value data to the account. These will be sent with any associated account events on your webhooks. You can have a maximum of 5 pieces of metadata.
The epoch timestamp (seconds) when the account was created
A list of actions required by the user when the status is 'ActionRequired', each accompanied by a description. DEPRECATED - if you wish to determine if actions are required before payouts can be sent out, check: - if frozen is true on this response - if verification.status is Required on this response - if status is Invalid on any payout methods under /v1/accounts/{id}/payout-methods
{ "id": "ac_b83f2653-06d7-44a9-a548-5825e8186004", "type": "Sub", "status": "ActionRequired", "actionsRequired": [ { … } ], "frozen": false, "email": "test@ryftpay.com", "onboardingFlow": "Hosted", "entityType": "Business", "business": { "name": "Ryft LTD", "type": "Corporation", "registrationNumber": "12345678", "registrationDate": "1990-01-20", "registeredAddress": { … }, "contactEmail": "contact@test.com", "phoneNumber": "+447900000000", "tradingName": "Ryft Computer Parts Ltd", "tradingAddress": { … }, "tradingCountries": [ … ], "websiteUrl": "https://www.example.com", "documents": [ … ] }, "individual": { "firstName": "Fred", "middleNames": "David", "lastName": "Jones", "email": "fred.jones@example.com", "dateOfBirth": "1990-01-20", "countryOfBirth": "GB", "gender": "Male", "nationalities": [ … ], "address": { … }, "phoneNumber": "+447900000000", "documents": [ … ] }, "verification": { "status": "Required", "requiredFields": [ … ], "requiredDocuments": [ … ], "errors": [ … ], "persons": { … } }, "metadata": { "accountId": "1" }, "settings": { "payouts": { … } }, "capabilities": { "visaPayments": { … }, "mastercardPayments": { … }, "amexPayments": { … }, "inPersonPayments": { … } }, "termsOfService": { "acceptance": { … } }, "createdTimestamp": 1470989538 }
The request for updating an account
use this parameter to attach key-value data to the account. These will be sent with any associated account events on your webhooks. You can have a maximum of 5 pieces of metadata.
- Sandbox environmmenthttps://sandbox-api.ryftpay.com/v1/accounts/{id}
- Production environmenthttps://api.ryftpay.com/v1/accounts/{id}
- cURL
- Node
- Python
curl -i -X PATCH \
https://sandbox-api.ryftpay.com/v1/accounts/ac_b83f2653-06d7-44a9-a548-5825e8186004 \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"entityType": "Business",
"business": {
"name": "Ryft LTD",
"type": "Corporation",
"registrationNumber": "12345678",
"registrationDate": "1990-01-20",
"registeredAddress": {
"lineOne": "123 Test Street",
"lineTwo": null,
"city": "Manchester",
"country": "GB",
"postalCode": "SP4 7DE",
"region": null
},
"contactEmail": "contact@test.com",
"phoneNumber": "+447900000000",
"tradingName": "Ryft Computer Parts Ltd",
"tradingAddress": {
"lineOne": "123 Test Street",
"lineTwo": null,
"city": "Manchester",
"country": "GB",
"postalCode": "SP4 7DE",
"region": null
},
"tradingCountries": [
"GB"
],
"websiteUrl": "https://www.example.com",
"documents": [
{
"type": "BankStatement",
"front": "fl_01G0EYVFR02KBBVE2YWQ8AKMGJ",
"back": "fl_01G0EYVFR02KBBVE2YWQ8AKMGJ",
"country": "GB"
}
]
},
"individual": {
"firstName": "Fred",
"middleNames": "David",
"lastName": "Jones",
"email": "fred.jones@example.com",
"dateOfBirth": "1990-01-20",
"countryOfBirth": "GB",
"gender": "Male",
"nationalities": [
"GB"
],
"address": {
"lineOne": "123 Test Street",
"lineTwo": null,
"city": "Manchester",
"country": "GB",
"postalCode": "SP4 7DE",
"region": null
},
"phoneNumber": "+447900000000",
"documents": [
{
"type": "BankStatement",
"front": "fl_01G0EYVFR02KBBVE2YWQ8AKMGJ",
"back": "fl_01G0EYVFR02KBBVE2YWQ8AKMGJ",
"country": "GB"
}
]
},
"metadata": {
"accountId": "1"
},
"settings": {
"payouts": {
"schedule": {
"type": "Automatic"
}
}
},
"termsOfService": {
"acceptance": {
"ipAddress": "127.0.0.1",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36",
"when": 1697557453
}
},
"capabilities": {
"amexPayments": {
"requested": true
},
"inPersonPayments": {
"requested": true
}
}
}'The account was updated successfully
A flag to determine whether or not the account is frozen. We may temporarily mark an account as frozen if we detect any potential fraudulent activity. Payments can still be taken however payouts will be disabled, contact us to resolve the issue.
use this parameter to attach key-value data to the account. These will be sent with any associated account events on your webhooks. You can have a maximum of 5 pieces of metadata.
The epoch timestamp (seconds) when the account was created
A list of actions required by the user when the status is 'ActionRequired', each accompanied by a description. DEPRECATED - if you wish to determine if actions are required before payouts can be sent out, check: - if frozen is true on this response - if verification.status is Required on this response - if status is Invalid on any payout methods under /v1/accounts/{id}/payout-methods
{ "id": "ac_b83f2653-06d7-44a9-a548-5825e8186004", "type": "Sub", "status": "ActionRequired", "actionsRequired": [ { … } ], "frozen": false, "email": "test@ryftpay.com", "onboardingFlow": "Hosted", "entityType": "Business", "business": { "name": "Ryft LTD", "type": "Corporation", "registrationNumber": "12345678", "registrationDate": "1990-01-20", "registeredAddress": { … }, "contactEmail": "contact@test.com", "phoneNumber": "+447900000000", "tradingName": "Ryft Computer Parts Ltd", "tradingAddress": { … }, "tradingCountries": [ … ], "websiteUrl": "https://www.example.com", "documents": [ … ] }, "individual": { "firstName": "Fred", "middleNames": "David", "lastName": "Jones", "email": "fred.jones@example.com", "dateOfBirth": "1990-01-20", "countryOfBirth": "GB", "gender": "Male", "nationalities": [ … ], "address": { … }, "phoneNumber": "+447900000000", "documents": [ … ] }, "verification": { "status": "Required", "requiredFields": [ … ], "requiredDocuments": [ … ], "errors": [ … ], "persons": { … } }, "metadata": { "accountId": "1" }, "settings": { "payouts": { … } }, "capabilities": { "visaPayments": { … }, "mastercardPayments": { … }, "amexPayments": { … }, "inPersonPayments": { … } }, "termsOfService": { "acceptance": { … } }, "createdTimestamp": 1470989538 }
Request
Once you have created all Persons and satisfied all the verification requirements for them and the Business, you submit these details for verification. This endpoint cannot be accessed for Individual sub accounts as this process is done automatically after satisfying the verification requirements.
- Sandbox environmmenthttps://sandbox-api.ryftpay.com/v1/accounts/{id}/verify
- Production environmenthttps://api.ryftpay.com/v1/accounts/{id}/verify
- cURL
- Node
- Python
curl -i -X POST \
https://sandbox-api.ryftpay.com/v1/accounts/ac_b83f2653-06d7-44a9-a548-5825e8186004/verify \
-H 'Authorization: YOUR_API_KEY_HERE'Verification was successfully submitted.
A flag to determine whether or not the account is frozen. We may temporarily mark an account as frozen if we detect any potential fraudulent activity. Payments can still be taken however payouts will be disabled, contact us to resolve the issue.
use this parameter to attach key-value data to the account. These will be sent with any associated account events on your webhooks. You can have a maximum of 5 pieces of metadata.
The epoch timestamp (seconds) when the account was created
A list of actions required by the user when the status is 'ActionRequired', each accompanied by a description. DEPRECATED - if you wish to determine if actions are required before payouts can be sent out, check: - if frozen is true on this response - if verification.status is Required on this response - if status is Invalid on any payout methods under /v1/accounts/{id}/payout-methods
{ "id": "ac_b83f2653-06d7-44a9-a548-5825e8186004", "type": "Sub", "status": "ActionRequired", "actionsRequired": [ { … } ], "frozen": false, "email": "test@ryftpay.com", "onboardingFlow": "Hosted", "entityType": "Business", "business": { "name": "Ryft LTD", "type": "Corporation", "registrationNumber": "12345678", "registrationDate": "1990-01-20", "registeredAddress": { … }, "contactEmail": "contact@test.com", "phoneNumber": "+447900000000", "tradingName": "Ryft Computer Parts Ltd", "tradingAddress": { … }, "tradingCountries": [ … ], "websiteUrl": "https://www.example.com", "documents": [ … ] }, "individual": { "firstName": "Fred", "middleNames": "David", "lastName": "Jones", "email": "fred.jones@example.com", "dateOfBirth": "1990-01-20", "countryOfBirth": "GB", "gender": "Male", "nationalities": [ … ], "address": { … }, "phoneNumber": "+447900000000", "documents": [ … ] }, "verification": { "status": "Required", "requiredFields": [ … ], "requiredDocuments": [ … ], "errors": [ … ], "persons": { … } }, "metadata": { "accountId": "1" }, "settings": { "payouts": { … } }, "capabilities": { "visaPayments": { … }, "mastercardPayments": { … }, "amexPayments": { … }, "inPersonPayments": { … } }, "termsOfService": { "acceptance": { … } }, "createdTimestamp": 1470989538 }
Request
Used to create manual payouts for a specified sub account. This API can only be accessed for NonHosted sub accounts that are configured for manual payouts. Note that the following requirements must be met:
- the
payoutMethodIdsupplied must have status equal toValid amountmust be greater than or equal to the minimum configured payout amount for the account (e.g. £100)verification.statuscannot beRequiredon the accountfrozenmust not betrueon the account
The payout method to send the payout amount to
- Sandbox environmmenthttps://sandbox-api.ryftpay.com/v1/accounts/{id}/payouts
- Production environmenthttps://api.ryftpay.com/v1/accounts/{id}/payouts
- cURL
- Node
- Python
curl -i -X POST \
https://sandbox-api.ryftpay.com/v1/accounts/ac_b83f2653-06d7-44a9-a548-5825e8186004/payouts \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"amount": 5000,
"currency": "GBP",
"payoutMethodId": "pm_01FCTS1XMKH9FF43CAFA4CXT3P",
"metadata": {
"orderId": "1",
"customerId": "123"
}
}'Successfully created payout
The status of the payout
Whether the payout was issued automatically by Ryft or manually requested.
If the payout is in the 'Failed' status, this is an additional reason to explain why
The scheme used to payout to your account
The epoch timestamp (seconds) when the payout was created
epoch timestamp of when the payout is scheduled to be paid
epoch timestamp of when the payout moved to the 'Completed' status, i.e. when it was paid out
Your custom key-value data for the payout. You can have a maximum of 5 pieces of metadata.
Deprecated - please use the 'payoutId' param on the /balance-transactions endpoint to see transactions in a payout.
Deprecated - please use the 'payoutId' param on the /balance-transactions endpoint to see transactions in a payout. The date on which payments within this payout began, in the format yyyy-MM-dd
Deprecated - please use the 'payoutId' param on the /balance-transactions endpoint to see transactions in a payout. The date on which payments within this payout end, in the format yyyy-MM-dd
{ "id": "po_01FJ1H0023R1AHM77YQ75RMKE7", "paymentsTakenDate": "2021-10-14", "paymentsTakenDateFrom": "2021-10-14", "paymentsTakenDateTo": "2021-10-14", "amount": 9750, "currency": "GBP", "status": "InProgress", "scheduleType": "Automatic", "payoutMethod": { "id": "pm_01FCTS1XMKH9FF43CAFA4CXT3P", "bankAccount": { … } }, "failureReason": "InvalidPayoutMethod", "payoutCalculation": { "paymentsCapturedAmount": 10000, "paymentsRefundedAmount": 50, "paymentsSplitAmount": 10000, "paymentsSplitRefundedAmount": 50, "splitPaymentsAmount": 10000, "splitPaymentsRefundedAmount": 50, "platformFeesCollectedAmount": 0, "platformFeesRefundedAmount": 0, "platformFeesPaidAmount": 100, "processingFeesPaidAmount": 100, "chargebacksAmount": 100, "chargebackReversalsAmount": 100, "platformChargebacksAmount": 100, "platformChargebackReversalsAmount": 100, "transferredInAmount": 100, "transferredOutAmount": 100, "payoutAmount": 9750, "currency": "GBP", "numberOfPaymentsCaptured": 100, "numberOfPaymentsRefunded": 1, "numberOfPaymentsSplit": 100, "numberOfPaymentsSplitRefunded": 1, "numberOfSplitPayments": 100, "numberOfSplitPaymentsRefunded": 1, "numberOfPlatformFeesCollected": 0, "numberOfPlatformFeesRefunded": 0, "numberOfChargebacks": 0, "numberOfChargebackReversals": 0, "numberOfPlatformChargebacks": 0, "numberOfPlatformChargebackReversals": 0, "numberOfTransfersIn": 0, "numberOfTransfersOut": 0, "numberOfCustomers": 74, "numberOfNewCustomers": 50 }, "scheme": "Fps", "createdTimestamp": 1631696701, "scheduledTimestamp": 1631696701, "completedTimestamp": 1631696701, "metadata": { "orderId": "1", "customerId": "123" } }
Control the order (newest or oldest) in which the payouts are returned. false will arrange the results with newest first whereas true shows oldest first.
Control how many payouts are returned in the result list. The max limit we allow is 50.
A token to identify where to resume a subsequent paginated query. The value of the paginationToken field from that response should be supplied here in order to retrieve the next page of results.
The start timestamp (inclusive), it must be before the endTimestamp.
The timestamp when to return payouts up to (inclusive), it must be after the startTimestamp.
The date when payments were taken to search for payouts from (inclusive), in the format yyyy-MM-dd
- Sandbox environmmenthttps://sandbox-api.ryftpay.com/v1/accounts/{id}/payouts
- Production environmenthttps://api.ryftpay.com/v1/accounts/{id}/payouts
- cURL
- Node
- Python
curl -i -X GET \
https://sandbox-api.ryftpay.com/v1/accounts/ac_b83f2653-06d7-44a9-a548-5825e8186004/payouts \
-H 'Authorization: YOUR_API_KEY_HERE'{ "payouts": [ { … } ], "paginationToken": "po_01FCTS1XMKH9FF43CAFA4CXT3P" }
- Sandbox environmmenthttps://sandbox-api.ryftpay.com/v1/accounts/{id}/payouts/{payoutId}
- Production environmenthttps://api.ryftpay.com/v1/accounts/{id}/payouts/{payoutId}
- cURL
- Node
- Python
curl -i -X GET \
https://sandbox-api.ryftpay.com/v1/accounts/ac_b83f2653-06d7-44a9-a548-5825e8186004/payouts/po_01FCTS1XMKH9FF43CAFA4CXT3P \
-H 'Authorization: YOUR_API_KEY_HERE'Successfully retrieved the given Payout
The status of the payout
Whether the payout was issued automatically by Ryft or manually requested.
If the payout is in the 'Failed' status, this is an additional reason to explain why
The scheme used to payout to your account
The epoch timestamp (seconds) when the payout was created
epoch timestamp of when the payout is scheduled to be paid
epoch timestamp of when the payout moved to the 'Completed' status, i.e. when it was paid out
Your custom key-value data for the payout. You can have a maximum of 5 pieces of metadata.
Deprecated - please use the 'payoutId' param on the /balance-transactions endpoint to see transactions in a payout.
Deprecated - please use the 'payoutId' param on the /balance-transactions endpoint to see transactions in a payout. The date on which payments within this payout began, in the format yyyy-MM-dd
Deprecated - please use the 'payoutId' param on the /balance-transactions endpoint to see transactions in a payout. The date on which payments within this payout end, in the format yyyy-MM-dd
{ "id": "po_01FJ1H0023R1AHM77YQ75RMKE7", "paymentsTakenDate": "2021-10-14", "paymentsTakenDateFrom": "2021-10-14", "paymentsTakenDateTo": "2021-10-14", "amount": 9750, "currency": "GBP", "status": "InProgress", "scheduleType": "Automatic", "payoutMethod": { "id": "pm_01FCTS1XMKH9FF43CAFA4CXT3P", "bankAccount": { … } }, "failureReason": "InvalidPayoutMethod", "payoutCalculation": { "paymentsCapturedAmount": 10000, "paymentsRefundedAmount": 50, "paymentsSplitAmount": 10000, "paymentsSplitRefundedAmount": 50, "splitPaymentsAmount": 10000, "splitPaymentsRefundedAmount": 50, "platformFeesCollectedAmount": 0, "platformFeesRefundedAmount": 0, "platformFeesPaidAmount": 100, "processingFeesPaidAmount": 100, "chargebacksAmount": 100, "chargebackReversalsAmount": 100, "platformChargebacksAmount": 100, "platformChargebackReversalsAmount": 100, "transferredInAmount": 100, "transferredOutAmount": 100, "payoutAmount": 9750, "currency": "GBP", "numberOfPaymentsCaptured": 100, "numberOfPaymentsRefunded": 1, "numberOfPaymentsSplit": 100, "numberOfPaymentsSplitRefunded": 1, "numberOfSplitPayments": 100, "numberOfSplitPaymentsRefunded": 1, "numberOfPlatformFeesCollected": 0, "numberOfPlatformFeesRefunded": 0, "numberOfChargebacks": 0, "numberOfChargebackReversals": 0, "numberOfPlatformChargebacks": 0, "numberOfPlatformChargebackReversals": 0, "numberOfTransfersIn": 0, "numberOfTransfersOut": 0, "numberOfCustomers": 74, "numberOfNewCustomers": 50 }, "scheme": "Fps", "createdTimestamp": 1631696701, "scheduledTimestamp": 1631696701, "completedTimestamp": 1631696701, "metadata": { "orderId": "1", "customerId": "123" } }
Payouts
A payout represents the transfer of money from Ryft to a connected payout method (bank account), i.e. when we send money you're owed. Typically this is automated.
However, the payouts API allows you to explicitly create payouts for your sub accounts. Generally we'd recommend this if you are a marketplace who wants to control exactly when payouts should be sent out.
Transfers
A Transfer represents the movement of money between Ryft accounts.
This API allows platforms/marketplaces to transfer money from/to particular sub accounts, useful when:
- you owe a sub account money from a particular transaction and want to explicitly send it after the fact
- you want to recoup funds from a sub account, such as when dealing with disputes
- you want to collect additional/new commission from the sub account
Subscriptions
The subscriptions API allows you to automatically have Ryft schedule and charge recurring payments for a specific day and time. This API is not required to process recurring payments. After additional configuration, you can use our payment-sessions API to create and charge the recurring payments yourself.