Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Post an order → https://api.pei.is/docs/ui/index#!/Orders/Orders_SubmitOrder

    1. More detail about posting order is here

    2. The key detail that must be set correctly when using IFrame is SuccessReturnUrl and CancelReturnUrl

  2. Open the payment gateway web in iframe mode on your webpage.

  3. The payment gateway web will handle all 3DS verification so that happens all inside the Iframe.

  4. When the user has made a payment an event from the payment gateway webpage in the Iframe is sent to the parent page.

    1. This event contains information about if the payment was successful or failed and has the error code from Pei regarding and will include additional code and message from acquired if a credit card payment is made.

    2. Event example of a successful credit card payment event

      • Code Block
        languagejson
        {
          "code" : 200
          "message":"Payment Completed",
          "paymentCompleted" : true,
          "orderId" : "7Occ7bxbxN8H4NCvb9UdlQXUUbZHuYFK",
          "reference" : "some reference data from merchant",
          "cardActionResult" : {
              "acquirerStatusCode": "00",
              "acquirerMessage": "Approval."
            }
        }
    3. Event example of a failed credit card payment event

      • Code Block
        languagejson
        {
          "code" : 1002
          "message":"Buyer does not have enough .....",
          "paymentCompleted" : false,
          "orderId" : "7Occ7bxbxN8H4NCvb9UdlQXUUbZHuYFK",
          "reference" : "some reference data from merchant",
          "cardActionResult" : {
              "acquirerStatusCode": "51-I",
              "acquirerMessage": "Do not honor. ..."
            }
        }
  5. When the payment is successful and postback (webhook) message is sent to the merchant if defined in the order.

    1. Example of postback message

      1. Code Block
        languagejson
        {
          "orderId": "JqOuxhTtxJaxsxmXQ3JKIVjh2Jg23F5v",
          "purchaseId": 13593391,
          "mandateId": "bxex1d67c44e4f1fa03b8cbb97dca85f"
        }

Diagram of the flow

Lucidchart
pageCount1
autoUpdatefalse
alignleft
typerich
autoSize1
macroId92a91199-04f2-4135-b530-872eee3d025c
pages
instanceIdConfluence:5730988163
width700
documentId3c877cbf-9996-440f-a0cd-318ab1bea862
documentToken3c877cbf-9996-440f-a0cd-318ab1bea862|158359129|3542581255|6bgb4xYSbWSFqXYesN1XFK17ly0h4322J3IlwRuv7Uc=
updated1669812205327
height500

...