Wonder

Payment Link

Payment Link are a simple way for customers to pay you when you sell online. Create a single link that you can share with everyone.

Workflow

  1. Check customer managementDOC manage your customer if you want to tracking customer.
    a. Call create customerAPI create a customer profile
    b. Link a customerDOC into order when create payment link
  2. Check create payment linkDOC to create a payment link.
  3. Sharing the payment link URL to your customer.
  4. Customer completed payment on payment link URL.
  5. Redirect to your application after customer successful completed payment.
  6. Wonder backend will be send order - webhookDOC to your server.

The simply Payment Link does not include product details and only displays the payment amount.

  • Reference_number: This is usually your unique order ID, which is used to associate the Payment Link Order Number with your own order system.
  • Charge_fee: charge_fee is the final amount you charge to the user, and the currency of the received payment will be determined by the merchant's configuration.
json
{
    "order" : {
        "reference_number" : "<your side unique number>",
        "charge_fee" : "21.00",
        "note" : "test",
        "callback_url" : "<send webhook to your server>",
        "redirect_url" : "<redirect back to your website after payment completed.>",
         }
     }

Add product item details

Include detailed line Item information in the order result. These details will also be displayed on the Payment Link page for payers to review. line items size up to 100.

  • Purchasable_type: Fixed as Listing.
  • Price: The item price for single quantity.
  • Quantity: How many quantity delivery to customer.
  • Total: price * quantity.
  • Label: A short text description or product name.
json
{
    "order": {
        ...
        "line_items": [
                {
                    "purchasable_type": "Listing",
                    "price": "10.00",
                    "quantity": "2",
                    "total": "20.00",
                    "label": "<Product Name>"
                },
                ...
            ]
         }
    }

You can create a Payment Link for a specific Customer. This is usually configured for long-term regular customers. The customer can directly save a credit card as a Payment Token on the Payment Link page, and then select and use it directly without re-entering the card information.

json
{
     "customer_uuid" : "<customer uuid from create customer API>",
     "order" : {
        ...
     }
}

For security considerations, a Payment Link should not remain valid indefinitely. We provide two methods to control the lifecycle of a Payment Link.

  • Due Date: A date as YY-MM-DD format, the order will be voided after the date.
  • Timeout: The payment link will be expired after the timeout configure, start timer from first open the Payment Link page.
json
{
  "order" : {
    ...
    "due_date" : "2026-01-01",
    "timeout" : {
        "timer" : 60, //60 seconds
        "url" : "<Your website URL>", // redirect to your website after timeout.
    }
  }
}

Pre authorization

Beyond the conventional one-time payment scenarios, payment links also support pre-authorization. After customers complete pre-authorization via the Payment Link, you can finalize the transaction through the Capture API.

Not all payment methods support pre-authorization transactions, and those that do not will not be displayed.

json
    {
        "order" : {
            ...
            "is_only_pre_auth" : true,
        }
    }

Display option

To support global operations or specific marketing strategies, you may want to show your customers a reference price that differs from the actual payment amount. The display_option object allows you to independently set a currency and amount for frontend display when creating a Payment Link. This does not affect the actual transaction currency or settlement amount; it serves only as a reference price for the user.

json
    {
    "order": {
        ... 
        "display_option": {
            "amount_override": {
                "initial_total": "200",
                "currency": "AUD"
            }
        }
    }
}
        

No coding mode

Generate a invoice LinkDOC without any coding.