Checkout Redirect

The integration in an online store using the Redirect checkout option requires the creation of a Payment Request (Creating a payment request ) and the redirection to the URL obtained in the response of this method, in the parameter checkout_url.

When redirecting to the SimpleFi checkout, it is necessary to include the redirection parameters to the merchant's website once the operation in the checkout is completed. These parameters are:

  • redirect_url: The URL of the merchant's platform where the user is to be redirected once the payment is successful.

  • error_url: The URL of the merchant's platform where the user is to be redirected once the payment is not successful.

Example:

curl -X POST https://api.simplefi.tech/payment_request \
-H "Content-Type: application/json" \
-d '{
  "ars_amount": 1000,
  "amount": 0.002,
  "currency": "ARS",
  "card_payment": false,
  "reference": {
    "order_id": "123456789"
  },
  "memo": "Compra en Café Cuyo",
  "coins": [
    {
      "ticker": "BCH",
      "chain_id": 1
    }
  ],
  "notification_url": "https://tuweb.com/notificacion",
  "merchant_id": "cafecuyo123"
}'

The response could be:

You must take the checkout_url, add the redirection parameters, and redirect the user

Example redirect URL

Last updated