POST /api/v1/pa/payment_links/create
top of page
bottom of page
import axios from 'axios';
const requestBody = {
"amount": 165.15,
"collectable_shopper_info": {
"billing_address": false,
"message": true,
"phone_number": false,
"reference": false,
"shipping_address": false
},
"connected_account_id": "acct_4lnVokTfP3ulKDlzLDJdjg",
"currency": "EUR",
"customer_id": "cus_ps8e0ZgQzd2QnCxVpzJrHD6KOVu",
"default_currency": "EUR",
"description": "shoes and dress",
"expires_at": "2021-11-04T16:00:00Z",
"metadata": {
"customer_id": "12345678"
},
"reference": "1529",
"reusable": false,
"supported_currencies": [
"NZD",
"AUD"
],
"title": "Order #1529"
};
axios
.request({
url: 'https://api-demo.airwallex.com/api/v1/pa/payment_links/create',
method: 'post',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0b20iLCJyb2xlcyI6WyJ1c2VyIl0sImlhdCI6MTQ4ODQxNTI1NywiZXhwIjoxNDg4NDE1MjY3fQ.UHqau03y5kEk5lFbTp7J4a-U6LXsfxIVNEsux85hj-Q',
},
data: requestBody,
})
.then(({ data }) => { ... })
.catch(error => { ... });