Create Order

Description

The orders are placed using create order API method. Payment URL is generated after successful call. Buyer should be redirected to payment URL. On this page buyer can see the payment amount, select the desired payment currency and complete the payment.

post
Create Order

https://v2-listener.citypay.io/api/generateOrder
Request
Response
Request
Path Parameters
customer_id
required
string
Your account's ID
access_token
required
string
Access token issued by CityPay
order_id
required
integer
Order ID
order_token
required
integer
Unique token for order given by you
amount
required
number
The price set by the merchant in double type
Response
200: OK
Order was successfully created
{
"status": 1,
"status_code ": 201,
"message": {
"id": 441,
"payment_url": "https://v2-order.citypay.io/invoice?token=2334232323233232323",
"token": "2334232323233232323"
}
}
422: Unprocessable Entity
Invalid parameters
{
"status": "error",
"status_code ": 422,
"message": {
"amount": "The amount field is required."
}
}

‚Äč