Payment APIs
Create Payment Link
Create a payment link. In response you will get the Payment Link reference and the Payment link URL. You can share the payment link with your customer. The master merchant can also create the payment link for their sub-merchants, by passing the sub-merchant key as a header. Refer API docs for additional information.
post/api/paymentLink
Request
- Base URLhttps://api.portone.cloud
- URLhttps://api.portone.cloud/api/paymentLink
- Authnone declared
Headers
Content-Typestring
X-Portone-Client-Keystring
X-Portone-SubMerchant-Keystring
Authorizationstring
The Authorization header is used to include the JWT for authenticating API requests; learn how to generate the token <a href="/docs/jwt-authentication" target="_blank">in this guide</a>
Request body
Example request
{
"portone_key": "pbmYjsswixLjpqmj",
"merchant_details": {
"name": "Nike",
"back_url": "https://demo.portone.cloud/checkout.html",
"promo_code": "",
"promo_discount": 0,
"shipping_charges": 0
},
"merchant_order_id": "<Unique Merchant Order ID>",
"signature_hash": "<Generated SignatureHash>",
"amount": 140000,
"currency": "VND",
"country_code": "VN",
"billing_details": {
"billing_name": "Test mark",
"billing_surname": "Something",
"billing_email": "jatin@portone.io",
"billing_phone": "+848959893980",
"billing_address": {
"city": "City",
"country_code": "VN",
"locale": "en",
"line_1": "address11",
"line_2": "address_211",
"postal_code": "400202",
"state": "Maha",
"country_name": "Vietnam"
}
},
"shipping_details": {
"shipping_name": "xyz",
"shipping_surname": "Something",
"shipping_email": "xyz@gmail.com",
"shipping_phone": "1234567890",
"shipping_address": {
"city": "City",
"country_code": "VN",
"locale": "en",
"line_1": " address1",
"line_2": " address_2",
"postal_code": "400202",
"state": "Mah",
"country_name": "Vietnam"
}
},
"order_details": [
{
"id": "1",
"price": 140000,
"name": "Stubborn Attachments",
"quantity": 1,
"image": "https://www.demo.portone.cloud/images/bella-toes.jpg",
"additional_details": {
"color": "black",
"size": 20
}
}
],
"success_url": "https://checkout.portone.cloud/success.html",
"failure_url": "https://checkout.portone.cloud/failure.html",
"pending_url": "https://checkout.portone.cloud/pending.html",
"expiry_date": "2020-02-27T14:30:00.000Z",
"source": "api",
"show_shipping_details": true,
"show_back_button": false,
"is_checkout_embed": false,
"notify_by_email": false,
"notify_by_phone": false,
"environment": "sandbox",
"description": "PortOne team testing"
}Response
Successful response
Changes
No recorded changes to this operation across all 2 revisions of this API.