Rumbapay provides two options for processing payment requests: redirection to the Rumbapay payment page (HPP) and direct server-to-server communication (H2H). When creating a payment using the method https://api.rumbapay.online/v1/payment you must inspect the challenge.challenge_type field to determine the appropriate flow.
Base URLs: https://api.rumbapay.online/v1/
Data Format: JSON
HTTP Methods: POST, PUT, GET
Create payment API
Initialize Payment
When creating a payment using the method https://api.rumbapay.online/v1/payment you must inspect the challenge.challenge_type field to determine the appropriate flow.
Method: HTTP POST
URL:https://api.rumbapay.online/v1/payment
Initialize Payment request (request body) can take two forms.
The system accepts and processes both types of requests.
Requests are handled identically, regardless of the request body format.
Request Body Type 1:
{
"method": "bank_transfer_argentina", // required
"reference": "334545", // required
"currency": "ARS", // required
"amount": 25.01, // required
"description": "My order h2h", // optional
"customer":// required
{
"identifier": "1111-1111-2211-2211", // required, any unique value from the merchant's system may be used.
"email": "juancarlos@hotmail.com", // optional
"phone": "+5491123456789", // optional
"first_name": "Juan", // required
"last_name": "GarcÃa RodrÃguez", // required
"middle_name": "Carlos", // optional
"country": "AR", // optional, Argentina (ISO 3166-1 country code for Argentina)
"state_code": "B", // optional, Buenos Aires Province (ISO 3166-2 state code for Buenos Aires)
"city": "Buenos Aires", // optional
"address": "Calle Emilio Mitre 3256", // optional
"zip_code": "C1407", // optional
"itn": "X1234567890", // required, CUIT/CUIL/CDI number (Argentine tax identification number)
"birthday": "2006-01-02", // optional
"ip": "192.168.0.1", // optional
"gender": "male" // optional
},
"redirect_url": "redirect_url", // optional
"cancel_url": "cancel_url", // optional
"callback_url": "callback_url", // conditional
"extra": // conditional, any field which may be needed for transaction routing and integration
[
{"key_1":"value"},
{"key_2":"value"},
{"key_3":"value"},
{"key_4":"value"}
]
}
Request Body Type 2:
{
"reference": "334545", // required
"currency": "ARS", // required
"amount": 25.01, // required
"description": "My order h2h", // optional
"customer":// required
{
"identifier": "1111-1111-2211-2211", // required, any unique value from the merchant's system may be used.
"email": "juancarlos@hotmail.com", // optional
"phone": "+5491123456789", // optional
"first_name": "Juan", // required
"last_name": "GarcÃa RodrÃguez", // required
"middle_name": "Carlos", // optional
"country": "AR", // optional, Argentina (ISO 3166-1 country code for Argentina)
"state_code": "B", // optional, Buenos Aires Province (ISO 3166-2 state code for Buenos Aires)
"city": "Buenos Aires", // optional
"address": "Calle Emilio Mitre 3256", // optional
"zip_code": "C1407", // optional
"itn": "X1234567890", // required, CUIT/CUIL/CDI number (Argentine tax identification number)
"birthday": "2006-01-02", // optional
"ip": "192.168.0.1", // optional
"gender": "male" // optional
},
"widget":
{
"method": "bank_transfer_argentina", // required
"locale": "es" // optional
},
"redirect_url": "redirect_url", // optional
"cancel_url": "cancel_url", // optional
"callback_url": "callback_url", // conditional
"extra": // conditional, any field which may be needed for transaction routing and integration
[
{"key_1":"value"},
{"key_2":"value"},
{"key_3":"value"},
{"key_4":"value"}
]
}
💡The payment process depends on challenge_typeparameter received
REQUISITES Payment Flow:
Merchant sends a payment request to https://api.rumbapay.online/v1/payment
Rumbapay validates the request and returns payment details including:
Bank account information for the customer to make the payment
Required form fields the merchant must collect from the customer
Customer makes the payment using the provided bank information
Merchant collects payment confirmation details from the customer (transaction ID, etc.)
Merchant sends confirmation data to https://api.rumbapay.online/v1/payment/{request_id}
Rumbapay processes the payment confirmation and updates the status to "pending"
Rumbapay verifies the payment with the banking provider
Rumbapay sends a callback to the merchant's callback URL when the payment reaches a terminal state (success, error, etc.)
REDIRECT Payment Flow:
Merchant sends a payment registration request to https://api.rumbapay.online/v1/payment
Rumbapay validates the request and returns a redirect_url for the customer
Merchant redirects the customer to the provided redirect_url, where a payment form will be displayed
Customer fills out the payment form with the required details
Customer submits the form directly to Rumbapay or Payment provider
Rumbapay or provider processes the submission and updates the payment status to "pending"
If a redirect_url was specified in the initial registration request, Rumbapay redirects the customer to that URL; otherwise, Rumbapay displays its own status page to the customer
Rumbapay verifies the payment with the banking provider
Rumbapay sends a callback to the merchant's callback URL when the payment reaches a terminal state (success, error, etc.)
Additionally, the merchant can check the payment status at any time by sending a request to https://api.rumbapay.online/v1/transaction/{request_id} as described in the "Check Payment Status" section
Response (Success):
Response - 200 OK
First, you should check error_code field of response.
If error_code field is not equals to 0 - transaction is Failed.
Second, you should check status field.
The status field will always be set to created if there are no errors.
Make check request or wait for a callback to get final transaction status.
If the challenge.challenge_type is requisites, prompt the user to make a payment using the details in challenge_form.payment_information and confirm the payment by sending the information to .
We strongly recommend validating the callback signature to avoid suspicious activity. Follow the docs to prepare callback verification.