Skip to main content

Payments

The API allow to accept payments . refund or get the status of a payment. you can retrieve a single payment or all payments.

endpoints

POST /api/v1/payments
GET /api/v1/payments/:id
GET /api/v1/payments

create

POST /api/v1/payments

parameters:

ParameterTypeinRequiredDescription
amountnumberbodyYesthe amount of the payment
currencystringbodyYesthe currency of the payment
customerstringbodyYesthe source of the payment
reciverstringbodyNothe destination of the payment
confirmboolbodyNoif the payment should be
descriptionstringbodyNothe description of the payment

i.e.

{
"amount": 100,
"currency": "USD",
"customer": "cus_5f3f8f8f8f8f8f8f8f8f8f8f8f8f8f8f",
"reciver": "cus_5f3f8f8f8f8f8f8f8f8f8f8f8f8f8f8f",
"confirm": true,
"description": "payment description"
}

get

GET /api/v1/payments/:id

use this endpoint to get single payment

i.e.

GET /api/v1/payments/pay_5f3f8f8f8f8f8f8f8f8f8f8f8f8f8f8f

response:

{
"id": "pay_5f3f8f8f8f8f8f8f8f8f8f8f8f8f8f8f",
"amount": 100,
"currency": "USD",
"customer": "cus_5f3f8f8f8f8f8f8f8f8f8f8f8f8f8f8f"
}

get all

GET /api/v1/payments