Standard Integration
Overview
Moneroo Standard is our "standard" payments flow that redirects your customer to a Moneroo-hosted payments page.
Here's how it works:
From your server, call the payment initialization endpoint with the payment details.
We'll return a link to a payment page. Redirect your customer to this link to make the payment.
Upon completion of the transaction, we'll redirect the customer back to you (to the return_url you provided) with the payment details.
Step 1: Collect payment details
First, you need to assemble payment details that will be sent to your API as a JSON object.
Here fields you need to collect:
amount
integer
Yes
The payment amount.
currency
string
Yes
The currency of the payment.
description
string
Yes
Description of the payment.
return_url
string
Yes
Return URL where your customer will be redirected after payment.
customer.email
string
Yes
Customer's email address.
customer.first_name
string
Yes
Customer's first name.
customer.last_name
string
Yes
Customer's last name.
customer.phone
string
NoΒΉ
Customer's phone number.
customer.address
string
NoΒΉ
Customer's address.
customer.city
string
NoΒΉ
Customer's city.
customer.state
string
NoΒΉ
Customer's state.
customer.country
string
NoΒΉ
Customer's country.
customer.zip
string
NoΒΉ
Customer's zip code.
metadata
array
NoΒ²
Additional data for the payment.
methods
array
NoΒ³
Payment method you want to make available for this transaction.
restrict_country_code
string
Noβ΄
Restrict the payment to a specific country.
restricted_phone
object
Noβ΄
Restrict the payment to a specific phone number.
restricted_phone.number
string
Yesβ΅
The phone number to restrict the payment to.
restricted_phone.country_code
string
Yesβ΅
The country code of the restricted phone number.
If not provided, the customer can be prompted to enter these details during the payment process based on the selected payment method.
There should be an array of key-value pairs. Only string values are allowed.
You can use either
restrict_country_code
or restricted_phone, but not both. They are mutually exclusive.Required if
restricted_phone
is provided.
Step 2: Obtain a Payment Link
Next, initiate the payment by calling the API with the collected payment details using the secret key for authorization.
Example request :
Example response :
Step 3: Redirect the User to the Payment Link
You only need to redirect your customer to the link returned in data.checkout_url
. We will display our payment interface for the customer to make the payment.
Step 4: After Payment
Once the payment is made, whether successful or failed, four things will occur:
We redirect your user to your
return_url
with the status,paymentId
, andpaymentStatus
in the query parameters once the payment is completed.If the payment is successful, we will send an acknowledgment email to your customer (unless you have disabled this feature).
We will email you (unless you have disabled this feature).
Example
Do not forget to replace
YOUR_SECRET_KEY
with your actual secret key.All subsequent examples should be executed in the backend. Never expose your secret key to the public.
Last updated
Was this helpful?