- 11 Jun 2024
- 3 Minutes to read
Make your first transaction
- Updated on 11 Jun 2024
- 3 Minutes to read
Quick Start
To get started with a quick integration, we recommend using our Checkout, which will allow you to make a test payment without investing much time.
Payment process flow
The customer arrives at the site or platform checkout page.
You make a server-side request to create an OrkestaPay checkout.
You redirect the client to the URL provided (
checkout_redirect_url
).The customer sees a summary of their order and the available payment options.
Upon successful payment, the customer will be redirected to a URL you specified in step.
You can query our API to check the order status and apply your business logic.
Before you begin
To continue with this quickstart, you must have your API keys and authenticate to access the API services.
Step 1: Create a new checkout
When the customer is ready to pay, you must send the server-side request to create a new checkout. The response from the checkout creation service will return a URL (checkout_redirect_url
) to redirect the customer to an OrkestaPay payment page.
Sample Service Request
curl --request POST \
--url https://api.sand.orkestapay.com/v1/checkouts \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer REPLACE_WITH_YOUR_ACCESS_TOKEN' \
--data '
{
"completed_redirect_url": "REPLACE_WITH_YOUR_SUCCESS_URL",
"canceled_redirect_url": "REPLACE_WITH_YOUR_CANCEL_URL",
"allow_save_payment_methods": false,
"locale": "ES_LATAM",
"order": {
"merchant_order_id": "1366656595193",
"currency": "MXN",
"subtotal_amount": 1000,
"country_code": "MX",
"discounts": [
{
"amount": 10
}
],
"total_amount": 990,
"products": [
{
"id": "7197",
"name": "Pantalla TCL Smart TV Serie A3 A343 HD Android TV 40",
"quantity": 1,
"unit_price": 1000
}
],
"customer": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@yopmail.com"
}
}
}
'
Service response example
{
"checkout_id": "chk_e69283cb55814402b9372a2f834cc8a8",
"checkout_redirect_url": "https://checkout.sand.orkestapay.com/#/checkout/chk_e69283cb55814402b9372a2f834cc8a8/6f2d8077c669f0512cb655c1f2d19b3cc020f5fd8b17152e0d3de675575e8f69",
"completed_redirect_url": "https://example.com/complete?order_id=ord_a73c91e6f6f949a3a39c9557f353d308",
"canceled_redirect_url": "https://example.com/cancel?order_id=ord_a73c91e6f6f949a3a39c9557f353d308",
"allow_save_payment_methods": false,
"locale": "ES_LATAM",
"placed_at": "1713480514319",
"order": {
"order_id": "ord_a73c91e6f6f949a3a39c9557f353d308",
"status": "CREATED",
"expires_at": "1713566914212",
"merchant_order_id": "1366656595193",
"country": "México",
"country_code": "MX",
"currency": "MXN",
"taxes": [],
"discounts": [
{
"amount": 10
}
],
"subtotal_amount": 1000,
"total_amount": 990,
"products": [
{
"product_id": "7197",
"quantity": 1,
"unit_price": 1000,
"name": "Pantalla TCL Smart TV Serie A3 A343 HD Android TV 40"
}
],
"customer": {
"customer_id": "cus_414bae1120844159bf10f1d6c7b30d74",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@yopmail.com",
"created_at": "1713480514197",
"updated_at": "1713480514197"
},
"placed_at": "1713480514267",
"metadata": {}
}
}
API Documentation
For more information about the checkout creation service, visit the API Documentation.: https://orkestapay.readme.io/reference/create-checkout
Step 2: Redirect the user to the checkout
Once you have received the response from the checkout creation service, redirect the customer to the URL provided in the checkout_redirect_url
.
At this URL, the customer will see a summary of their order and the payment options to finalize their purchase.
Step 3: Handle the payment response
After the customer has successfully made their payment, they will be redirected to the URL (completed_redirect_url
) specified in the checkout creation request.
This URL, managed by the business integrated with OrkestaPay, will include the order_id
so that the status of the order can be checked to verify if it has been completed (COMPLETED). You can then implement the business logic that best suits your needs.
API Documentation
For details on checking the order status, refer to the API Documentation: https://orkestapay.readme.io/reference/get-order