POST
/
payment
/
process
cURL
curl --request POST \
  --url https://api.myxspend.com/v1/payment/process \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-COMPANY-ID: <api-key>' \
  --data '{
  "firstName": "<string>",
  "lastName": "<string>",
  "customerOrderId": "<string>",
  "email": "<string>",
  "phone": "<string>",
  "amount": 123,
  "currency": "USD",
  "success_url": "<string>",
  "failure_url": "<string>"
}'
{
  "country": "<string>",
  "CreatedOn": "<string>",
  "currency": "<string>",
  "customerOrderId": "<string>",
  "PaymentLink": "<string>",
  "PaymentLinkCode": "<string>",
  "responseCode": "<string>",
  "responseMessage": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

X-API-KEY
string
header
required
X-COMPANY-ID
string
header
required

Body

application/json

Payment details

firstName
string
required

Customer first name

lastName
string
required

Customer last name

customerOrderId
string
required

Customer order id (must be a unique id for each customer - recommend UUID format)

email
string
required

Customer email address

amount
number
required

Invoice amount

currency
enum<string>
required

Currency

Available options:
USD,
EUR
phone
string

Customer phone number

success_url
string

The url MyXspend will redirect the user to after a successful payment

failure_url
string

The url MyXspend will redirect the user to after a failed payment

Response

Successful payment response

country
string

Country of the request

CreatedOn
string

Date created

currency
string

Curency of the payment request

customerOrderId
string

Customer order id (Merchant/Company reference)

Payment link (where to send users to make payment)

Idetification of the requested payment

responseCode
string

DEPRECATED - please use the response code in the http header

responseMessage
string

Any message returned from the request