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:
Parameter | Type | in | Required | Description |
---|---|---|---|---|
amount | number | body | Yes | the amount of the payment |
currency | string | body | Yes | the currency of the payment |
customer | string | body | Yes | the source of the payment |
reciver | string | body | No | the destination of the payment |
confirm | bool | body | No | if the payment should be |
description | string | body | No | the 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