KashierDevelopersKashier Developers

Create a payment link

curl -X POST "https://test-api.kashier.io/v2/payment-link" \  -H "Content-Type: application/json" \  -d '{    "customer": {      "name": "John Doe"    },    "totalAmount": 100,    "description": "",    "isManualCapture": false,    "paymentType": "simple",    "currency": "EGP",    "state": "submitted",    "extraFees": [      {        "name": "VAT",        "flatFee": 0,        "rate": 5      },      {        "name": "annualFee",        "flatFee": 500,        "rate": 0      }    ],    "dueDate": "2030-01-01 00:00:00+00:00",    "isSuspendedPayment": false,    "referenceId": "123ss456"  }'
{  "message": "string",  "data": {    "_id": "string",    "paymentLinkId": "string",    "paymentRequestId": "string",    "merchantId": "string",    "merchantInfo": {      "storeName": "string"    },    "storeName": "string",    "description": "string",    "customerName": "string",    "customer": null,    "currency": "string",    "totalAmount": 0,    "totalAmountWithoutFees": 0,    "availableAmountForRefund": 0,    "paymentType": "string",    "paymentStatus": "string",    "state": "string",    "dueDate": null,    "creationDate": "string",    "referenceId": "string",    "invoiceReferenceId": "string",    "isSuspendedPayment": true,    "isManualCapture": true,    "isDeleted": true,    "isPaymentLink": true,    "isBulkCreated": true,    "extraFees": [      {        "name": "string",        "flatFee": 0,        "rate": 0      }    ],    "invoiceItems": [      {        "description": "string",        "unitPrice": 0,        "quantity": 0,        "subTotal": 0      }    ],    "labels": [      "string"    ],    "transactions": [      {}    ],    "virtualAmount": null,    "virtualCurrency": null,    "virtualExchangeRate": null,    "virtualRateRecordedAt": null  }}

Creates a single payment link for one customer. Set currency to a virtual currency code (USD_VIRTUAL, EUR_VIRTUAL, GBP_VIRTUAL, SAR_VIRTUAL, AED_VIRTUAL) with totalAmount expressed in that currency to collect in a foreign currency while settling in EGP. Currency conversion must be enabled on your account — without it a virtual currency is rejected with a 400 "Currency conversion feature is not enabled."

Authorization

secretKey
Authorization<token>

Merchant secret key used to identify the merchant, obtained from Kashier's dashboard. Pass the raw secret key value in the Authorization header (NOT a "Bearer" token).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

POST
/v2/payment-link