Redirect purchases

The Redirect purchase is the flow used for merchants where the customer needs to be redirected to an external page to complete the payment.

Flow diagram

PrintScreen

Flow description

Description/EndPoint or Actor
1The Merchant sends the purchase request with the PaymentMediaId of the corresponding payment method./purchase
2Bamboo returns the Purchase, with status Pending for Redirection, and a CommerceAction object containing an external service URL. ActionReason = REDIRECTION_NEEDED_EXTERNAL_SERVICE/purchase response
3The merchant must redirect the customer to the external service URL provided in the CommerceAction object.Commerce Site/Client browser
4Bamboo automatically redirects customers to an external payment processor to complete payment.Bamboo Site/Customer browser
5The customer follows the steps shown by the acquirer’s site to complete the payment.External Payment Site/Client
6Bamboo receives the response is received and processes and updates the transaction status. Then, Bamboo redirects back to the merchant’s response page (According to transaction status)./paymentCallback
7Bamboo receives an async push notification from acquire and notify back to the merchant’s notification webhook (the purchase status is updated)./webhook (Merchant)

Response URLS

As the result of the transaction, it can be in any of the following statuses.

StatusDescription
ApprovedPurchase approved. No verification is needed.
RejectedPurchase rejected.
CanceledThe customer or an automatic process has canceled the purchase.
PendingThe purchase is pending to be paid in a Cash Payment network, or to be confirmed by the payment method processor.

Therefore, the following URLs are defined to be sent in the Purchase when the same host-to-host is created before the redirection:

  • Url_Approved → callback URL when the purchase status is Approved
  • Url_Rejected → callback URL when the purchase status is Rejected
  • Url_Canceled → callback URL when the purchase status is Canceled
  • Url_Pending → callback URL when the purchase status is Pending
  • Url_Notify → webhook notification URL. The Purchase status is notified to this URL once the payment method processor notifies Bamboo. The notification to this URL is a REST POST with JSON payload instead of redirection. It can also be static and configured by Support Team.

Redirect Flow Purchase example

{
    "TrxToken":"OT__Kg1JdcN4Fz6g7RUCF_xdtbR5n0FVX4IctD__P3BSApY_",
    "Capture":"true",
    "Amount":10000000,
    "Installments":1,
    "Currency": "CLP",,
    "TargetCountryISO": "CL",
    "PaymentMediaId":106,
    "Redirection" : {
      "Url_Approved": "https://dummystore.com/checkout/approved",
      "Url_Rejected": "https://dummystore.com/checkout/rejected",
      "Url_Canceled": "https://dummystore.com/checkout/canceled",
      "Url_Pending": "https://dummystore.com/checkout/pending",
      "Url_Notify": "https://dummystore.com/checkout/notifications"
    }
}

The PaymentMediaId and TrxToken fields are optional, but it is mandatory to send one of them, depending on the flow you want to use.

  • PaymentMediaId: Alternative payment method identifier (transfer, cash, and processing that requires customer redirection). You can obtain this identifier by consulting the Payment methods by country section.
  • TrxToken: You can pre-generate the token and process the purchase by sending it in this field.

Redirect response content

The redirection callback response contains the PurchaseID and Status as FORM data (input data).

<form method="post" action="https://dummystore.com/checkout/approved">
  <input type="hidden" id="PurchaseId" name="PurchaseId" value="198742" />
  <input type="hidden" id="Status" name="Status" value="approved" />
</form>
footer
Last modified December 20, 2024

© Bamboo | All rights reserved 2024