Payment
Overview
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.
For this type of payment, you must set widget.method = bank_transfer_chile
and use the currency CLP
.
Otherwise, you may receive the following error: 273:Invalid adapter route configuration
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:
Request Body Type 2:
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 customerMerchant redirects the customer to the provided
redirect_url
, where a payment form will be displayedCustomer 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 customerRumbapay 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.
Challenge type: redirect
Response - 400 Bad request
Callback
On every completed Payout we send a callback notification to the URL you passed in the request in the callback_url field.
Callback flow
The callback flow follows these steps:
Rumbapay processes the payment request
When the payment status changes to a terminal state, Rumbapay sends an HTTP POST request to your callback URL
Your server should process the callback, validate the signature, and update your system
Your server should respond with HTTP 200 OK to acknowledge receipt
Example
Check Payment Status
Method: HTTP GET
URL: https://api.rumbapay.online/v1/transaction/{request_id}
Response (Success):
Response (Not Found):
Transaction not found
Last updated