Onerway
POST

Create payment link

Use this endpoint to create a payment link that customers can open to complete payment on an Onerway-hosted checkout page.

Request

merchantNo
Merchant number assigned by Onerway. See Setup for how to obtain it.
Example:
linkName
Display name for the payment link, used to identify the link in list queries and merchant operations.
amount
Payment amount in the specified currency. Use integer values for zero-decimal currencies. Format rules follow currency and amount validation.
Example:
currency
Payment currency as a three-letter ISO 4217 currency code that matches amount.
Example:
defaultCountry
Default country or region code used on the payment link checkout page. The recommended format is a two-letter ISO 3166-1 alpha-2 country code.
Example:
itemName
Name of the goods or services shown to the customer.
description
Description of the goods or services shown to the customer.
collectEmail
Whether the payment link checkout page collects the customer email address.
Example:
collectName
Whether the payment link checkout page collects the customer name.
Example:
sign
Request signature string. See Request signing for how to generate it.

Request example

curl -X POST 'https://sandbox-acq.onerway.com/v1/txn/paymentLink/add' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "amount": 99.99,
  "collectEmail": true,
  "collectName": true,
  "currency": "USD",
  "defaultCountry": "US",
  "description": "Demo product description",
  "itemName": "Demo product",
  "linkName": "Demo payment link",
  "merchantNo": "replace_with_merchant_no",
  "sign": "{{SIGN}}"
}'

Response

respCode
20000 means the create request was processed successfully. Other values are error codes. See Response codes.
respMsg
Human-readable message for the response code.
Business data object containing the created payment link.

Response example

Example code is unavailable.

No error responses are documented for this endpoint.