Create an axerve payment
How to create an axerve payment via API
To create a new axerve payment, send a POST
request to the /api/axerve_payments
endpoint, passing the resource arguments in the request body.
Request
POST https://yourdomain.commercelayer.io/api/axerve_payments
Arguments
Body Parameter
Type
Required
type
string
Required
attributes.return_url
string
Required
attributes.client_ip
string
Optional
attributes.buyer_details
object
Optional
attributes.request_token
boolean
Optional, default is 'false'
attributes.reference
string
Optional
attributes.reference_origin
string
Optional
attributes.metadata
object
Optional
relationships.order
object
Required
Example
The following request creates a new axerve payment:
curl -g -X POST \
'https://yourdomain.commercelayer.io/api/axerve_payments' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer your-access-token' \
-H 'Content-Type: application/vnd.api+json' \
-d '{
"data": {
"type": "axerve_payments",
"attributes": {
"return_url": "https://yourdomain.com/thankyou"
},
"relationships": {
"order": {
"data": {
"type": "orders",
"id": "ABCRtyUpBa"
}
}
}
}
}'
Last updated