Process payments with Ryft: authorizations, voids, captures, refunds etc.
- Add evidence to a dispute
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.
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.
The start timestamp (inclusive), it must be before the endTimestamp.
The timestamp when to return payment sessions up to (inclusive), it must be after the startTimestamp.
Control the order (newest or oldest) in which the disputes are returned. false will arrange the results with newest first, whereas true shows oldest first. The default is false.
Control how many items are return in a given page The max limit we allow is 25. The default is 10.
- Sandbox environmmenthttps://sandbox-api.ryftpay.com/v1/disputes
- Production environmenthttps://api.ryftpay.com/v1/disputes
- cURL
- Node
- Python
curl -i -X GET \
https://sandbox-api.ryftpay.com/v1/disputes \
-H 'Authorization: YOUR_API_KEY_HERE'{ "items": [ { … } ], "paginationToken": "dsp_01FCTS1XMKH9FF43CAFA4CXT3P_1641912473" }
- Sandbox environmmenthttps://sandbox-api.ryftpay.com/v1/disputes/{disputeId}
- Production environmenthttps://api.ryftpay.com/v1/disputes/{disputeId}
- cURL
- Node
- Python
curl -i -X GET \
https://sandbox-api.ryftpay.com/v1/disputes/dsp_01FCTS1XMKH9FF43CAFA4CXT3P \
-H 'Authorization: YOUR_API_KEY_HERE'Successfully retrieved the given Dispute
The ID of the dispute
Disputes are grouped into a specific category based on their reason.code. These define the overlapping reason across various card schemes (who each have their own codes)
The deadline by which the evidence needs responding by. Note that you cannot attach evidence or challenge the dispute once this date has passed. The dispute will move to Expired.
The evidence strongly recommended for the best chance to challenge and win the dispute. Note that this is based on the underlying reason.code of the Dispute and is subject to change should further types of evidence be added or no longer supported. Leverage this field to select the best forms of evidence should you choose to challenge the dispute.
If this dispute is for a payment under a sub account, then this contains details of that account
The epoch timestamp (seconds) when the dispute was created
{ "id": "dsp_01G0EYVFR02KBBVE2YWQ8AKMGJ", "amount": 500, "currency": "GBP", "status": "Open", "category": "Fraudulent", "reason": { "code": "13.6", "description": "Merchandise/Services Not Received" }, "respondBy": 1685059200, "recommendedEvidence": [ "ProofOfDelivery" ], "paymentSession": { "id": "ps_01G0EYVFR02KBBVE2YWQ8AKMGJ", "paymentType": "Standard", "paymentMethod": { … } }, "evidence": { "text": { … }, "files": { … } }, "customer": { "email": "john.doe@ryftpay.com", "id": "cus_01G0EYVFR02KBBVE2YWQ8AKMGJ", "createdTimestamp": 1470989538 }, "subAccount": { "id": "ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327" }, "createdTimestamp": 1470989538, "lastUpdatedTimestamp": 1470989538 }
- Sandbox environmmenthttps://sandbox-api.ryftpay.com/v1/disputes/{disputeId}/accept
- Production environmenthttps://api.ryftpay.com/v1/disputes/{disputeId}/accept
- cURL
- Node
- Python
curl -i -X POST \
https://sandbox-api.ryftpay.com/v1/disputes/dsp_01FCTS1XMKH9FF43CAFA4CXT3P/accept \
-H 'Authorization: YOUR_API_KEY_HERE'Successfully accepted the given Dispute
The ID of the dispute
Disputes are grouped into a specific category based on their reason.code. These define the overlapping reason across various card schemes (who each have their own codes)
The deadline by which the evidence needs responding by. Note that you cannot attach evidence or challenge the dispute once this date has passed. The dispute will move to Expired.
The evidence strongly recommended for the best chance to challenge and win the dispute. Note that this is based on the underlying reason.code of the Dispute and is subject to change should further types of evidence be added or no longer supported. Leverage this field to select the best forms of evidence should you choose to challenge the dispute.
If this dispute is for a payment under a sub account, then this contains details of that account
The epoch timestamp (seconds) when the dispute was created
{ "id": "dsp_01G0EYVFR02KBBVE2YWQ8AKMGJ", "amount": 500, "currency": "GBP", "status": "Open", "category": "Fraudulent", "reason": { "code": "13.6", "description": "Merchandise/Services Not Received" }, "respondBy": 1685059200, "recommendedEvidence": [ "ProofOfDelivery" ], "paymentSession": { "id": "ps_01G0EYVFR02KBBVE2YWQ8AKMGJ", "paymentType": "Standard", "paymentMethod": { … } }, "evidence": { "text": { … }, "files": { … } }, "customer": { "email": "john.doe@ryftpay.com", "id": "cus_01G0EYVFR02KBBVE2YWQ8AKMGJ", "createdTimestamp": 1470989538 }, "subAccount": { "id": "ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327" }, "createdTimestamp": 1470989538, "lastUpdatedTimestamp": 1470989538 }
Request
Adds or updates the evidence currently attached to the dispute. Note that for file evidence, you must first upload the file via our files API. Once you have attached all relevant evidence, call the /challenge endpoint to submit the evidence for review. Note: the Dispute must be in status Open for this operation.
- Sandbox environmmenthttps://sandbox-api.ryftpay.com/v1/disputes/{disputeId}/evidence
- Production environmenthttps://api.ryftpay.com/v1/disputes/{disputeId}/evidence
- cURL
- Node
- Python
curl -i -X PATCH \
https://sandbox-api.ryftpay.com/v1/disputes/dsp_01FCTS1XMKH9FF43CAFA4CXT3P/evidence \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"text": {
"billingAddress": null,
"shippingAddress": null,
"duplicateTransaction": null,
"uncategorised": null
},
"files": {
"proofOfDelivery": {
"id": "fl_01G0EYVFR02KBBVE2YWQ8AKMGJ"
},
"customerSignature": {
"id": "fl_01G0EYVFR02KBBVE2YWQ8AKMGJ"
},
"receipt": {
"id": "fl_01G0EYVFR02KBBVE2YWQ8AKMGJ"
},
"shippingConfirmation": {
"id": "fl_01G0EYVFR02KBBVE2YWQ8AKMGJ"
},
"customerCommunication": {
"id": "fl_01G0EYVFR02KBBVE2YWQ8AKMGJ"
},
"refundPolicy": {
"id": "fl_01G0EYVFR02KBBVE2YWQ8AKMGJ"
},
"recurringPaymentAgreement": {
"id": "fl_01G0EYVFR02KBBVE2YWQ8AKMGJ"
},
"uncategorised": {
"id": "fl_01G0EYVFR02KBBVE2YWQ8AKMGJ"
}
}
}'Successfully added the provided evidence given Dispute
The ID of the dispute
Disputes are grouped into a specific category based on their reason.code. These define the overlapping reason across various card schemes (who each have their own codes)
The deadline by which the evidence needs responding by. Note that you cannot attach evidence or challenge the dispute once this date has passed. The dispute will move to Expired.
The evidence strongly recommended for the best chance to challenge and win the dispute. Note that this is based on the underlying reason.code of the Dispute and is subject to change should further types of evidence be added or no longer supported. Leverage this field to select the best forms of evidence should you choose to challenge the dispute.
If this dispute is for a payment under a sub account, then this contains details of that account
The epoch timestamp (seconds) when the dispute was created
{ "id": "dsp_01G0EYVFR02KBBVE2YWQ8AKMGJ", "amount": 500, "currency": "GBP", "status": "Open", "category": "Fraudulent", "reason": { "code": "13.6", "description": "Merchandise/Services Not Received" }, "respondBy": 1685059200, "recommendedEvidence": [ "ProofOfDelivery" ], "paymentSession": { "id": "ps_01G0EYVFR02KBBVE2YWQ8AKMGJ", "paymentType": "Standard", "paymentMethod": { … } }, "evidence": { "text": { … }, "files": { … } }, "customer": { "email": "john.doe@ryftpay.com", "id": "cus_01G0EYVFR02KBBVE2YWQ8AKMGJ", "createdTimestamp": 1470989538 }, "subAccount": { "id": "ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327" }, "createdTimestamp": 1470989538, "lastUpdatedTimestamp": 1470989538 }
- Sandbox environmmenthttps://sandbox-api.ryftpay.com/v1/disputes/{disputeId}/evidence
- Production environmenthttps://api.ryftpay.com/v1/disputes/{disputeId}/evidence
- cURL
- Node
- Python
curl -i -X DELETE \
https://sandbox-api.ryftpay.com/v1/disputes/dsp_01FCTS1XMKH9FF43CAFA4CXT3P/evidence \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"text": [
"billingAddress"
],
"files": [
"proofOfDelivery"
]
}'Successfully removed the provided evidence from the Dispute
The ID of the dispute
Disputes are grouped into a specific category based on their reason.code. These define the overlapping reason across various card schemes (who each have their own codes)
The deadline by which the evidence needs responding by. Note that you cannot attach evidence or challenge the dispute once this date has passed. The dispute will move to Expired.
The evidence strongly recommended for the best chance to challenge and win the dispute. Note that this is based on the underlying reason.code of the Dispute and is subject to change should further types of evidence be added or no longer supported. Leverage this field to select the best forms of evidence should you choose to challenge the dispute.
If this dispute is for a payment under a sub account, then this contains details of that account
The epoch timestamp (seconds) when the dispute was created
{ "id": "dsp_01G0EYVFR02KBBVE2YWQ8AKMGJ", "amount": 500, "currency": "GBP", "status": "Open", "category": "Fraudulent", "reason": { "code": "13.6", "description": "Merchandise/Services Not Received" }, "respondBy": 1685059200, "recommendedEvidence": [ "ProofOfDelivery" ], "paymentSession": { "id": "ps_01G0EYVFR02KBBVE2YWQ8AKMGJ", "paymentType": "Standard", "paymentMethod": { … } }, "evidence": { "text": { … }, "files": { … } }, "customer": { "email": "john.doe@ryftpay.com", "id": "cus_01G0EYVFR02KBBVE2YWQ8AKMGJ", "createdTimestamp": 1470989538 }, "subAccount": { "id": "ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327" }, "createdTimestamp": 1470989538, "lastUpdatedTimestamp": 1470989538 }
Request
Challenges a specific dispute. You should call this endpoint once you have attached all the relevant evidence. Note that you can no longer submit further evidence once challenged, so make sure you have gathered as much as possible to ensure a better chance of winning the dispute.
- Sandbox environmmenthttps://sandbox-api.ryftpay.com/v1/disputes/{disputeId}/challenge
- Production environmenthttps://api.ryftpay.com/v1/disputes/{disputeId}/challenge
- cURL
- Node
- Python
curl -i -X POST \
https://sandbox-api.ryftpay.com/v1/disputes/dsp_01FCTS1XMKH9FF43CAFA4CXT3P/challenge \
-H 'Authorization: YOUR_API_KEY_HERE'Successfully challenged the given Dispute
The ID of the dispute
Disputes are grouped into a specific category based on their reason.code. These define the overlapping reason across various card schemes (who each have their own codes)
The deadline by which the evidence needs responding by. Note that you cannot attach evidence or challenge the dispute once this date has passed. The dispute will move to Expired.
The evidence strongly recommended for the best chance to challenge and win the dispute. Note that this is based on the underlying reason.code of the Dispute and is subject to change should further types of evidence be added or no longer supported. Leverage this field to select the best forms of evidence should you choose to challenge the dispute.
If this dispute is for a payment under a sub account, then this contains details of that account
The epoch timestamp (seconds) when the dispute was created
{ "id": "dsp_01G0EYVFR02KBBVE2YWQ8AKMGJ", "amount": 500, "currency": "GBP", "status": "Open", "category": "Fraudulent", "reason": { "code": "13.6", "description": "Merchandise/Services Not Received" }, "respondBy": 1685059200, "recommendedEvidence": [ "ProofOfDelivery" ], "paymentSession": { "id": "ps_01G0EYVFR02KBBVE2YWQ8AKMGJ", "paymentType": "Standard", "paymentMethod": { … } }, "evidence": { "text": { … }, "files": { … } }, "customer": { "email": "john.doe@ryftpay.com", "id": "cus_01G0EYVFR02KBBVE2YWQ8AKMGJ", "createdTimestamp": 1470989538 }, "subAccount": { "id": "ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327" }, "createdTimestamp": 1470989538, "lastUpdatedTimestamp": 1470989538 }