Embedded Payments Session Integration

Enables partners to embed a hosted checkout form that offloads PCI scope, enforces AVS/3DS, and returns reusable card‑on‑file tokens. Additionally, the embedded payments form supports completing a full payment intent—pre‑baking the amount and transaction details—and executes the sale in a single call, returning the complete transaction result. This approach simplifies PCI compliance, reduces development effort, and provides a consistent user experience.

Example flow of embedded payments form integration using payment links

Step 1 (backend)

Call the Create Payment Link API with your Private API key to get the payment link ID. Pass details such as merchant ID, currency, amount, cardholder name, address, phone, email etc.

Sample request

{
    "merchantId": "1cc7b594-b80f-4227-a0fa-299c4c6ce8ab",
    "data": {
        "type":"payment_session",   
        "amount": 12.50,        
        "currencyCode": "USD",
        "paymentMethods": ["CC_DC","ACH"],
        "oneTimeOnly":true,
        "salesTax": 2.50,
        "orderNumber": "A350",
        "startDate": "20220510",
        "endDate": "20221115",
        "description": "A coffee cup in the morning",
        "saveCardConsent": true,
        "internalTransactionID": "ID1",
        "customer":{
          "first_name":"John",
          "last_name":"Doe",
          "business_name":"",
          "address":{
            "street":"100 Main Street",
            "unit":"80",
            "city":"Austin",
            "state":"Texas",
            "country":"us",
            "postal_code":"76707",
           },
          "email":"[email protected]",
          "phone":{
            "country_code":"1",
            "subscriber":"8042773232"
           }
         },
         "success_text":"Thank you! Your payment has been successfully processed`",
         "failure_text":"Payment failed. Please try again",
         "metadata": {
            "customerId": "123",
            "email" : "[email protected]"
        }
    }
}

Sample response

Step 2 (client side)

2a. Display the payment session web component, use a custom callback handler to receive the transaction response on the client side.

2b. Display the payment session using client side JS

Step 3 (webhook event)

Once the payment is completed, a PAYMENTLINK_PAID webhook event will be sent with the transaction ID.

Sample webhook

Step 4 (transaction details)

Based on transaction ID received in the webhook, you can retrieve the transaction details such as the card/bank account token using transaction detail endpoint.

GET https://<Platform-host>/api/merchant/:merchant_id/transaction/:transaction_id

Sample response

Last updated