The One Time Passcode (OTP) API is a JSON-based RESTful API that enables merchants to verify OTP codes sent to buyers.
One Time Passcode API (1.0.0)
https://api.ratepay.com/
https://api-integration.ratepay.com/
- Ratepay Production Platform
https://api.ratepay.com/transaction/management/2fa/v1/verify/{transactionId}
- Ratepay Integration Platform
https://api-integration.ratepay.com/transaction/management/2fa/v1/verify/{transactionId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.ratepay.com/transaction/management/2fa/v1/verify/684CWYHCK05X2CN5K_N6 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"otp_code": 15316
}'OTP code verified successfully
The time until another OTP can be sent. Might be null in error responses or when the OTP is verified.
The id of the transaction that was tied to the OTP process
{ "timestamp": "2025-10-02T09:14:37.507714Z", "ratepayTransactionId": "684CWYHCK05X2CN5K_N6", "result": "otp_verified", "message": { "en": "Your code has been successfully verified.", "de": "Ihr Code wurde erfolgreich überprüft." }, "links": [ { … } ] }
- Ratepay Production Platform
https://api.ratepay.com/transaction/management/2fa/v1/regenerate/{transactionId}
- Ratepay Integration Platform
https://api-integration.ratepay.com/transaction/management/2fa/v1/regenerate/{transactionId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.ratepay.com/transaction/management/2fa/v1/regenerate/684CWYHCK05X2CN5K_N6 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'OTP code was regenerated successfully
The time until another OTP can be sent. Might be null in error responses or when the OTP is verified.
The id of the transaction that was tied to the OTP process
The time until the OTP process will expire and the OTP will be invalid.
{ "timestamp": "2025-10-02T09:14:37.507764Z", "regenerationPossibleInSeconds": 60, "ratepayTransactionId": "684CWYHCK05X2CN5K_N6", "result": "otp_sent", "message": { "en": "The code has been sent to your phone number 0049123411223344.", "de": "Der Code wurde an Ihre Telefonnummer 0049123411223344 gesendet." }, "timeToLiveInSeconds": 120, "links": [ { … }, { … } ] }