v1

latestOpenAPI 3.1.02026-07-26270268.6 KB

Create Payment Invoice

API to create a Payment Invoice

post/payment-intent/api/v1/direct/eInvoice

Request body

amountnumber double required

Amount for which payment invoice is created. Amount must be greater than 0.01. Must be equal to [eInvoiceItems.price * eInvoiceItems.quantity]

currency'SAR' | 'EGP' | 'AED' | 'QAR' | 'OMR' | 'BHD' | 'KWD' | 'USD' | 'GBP' | 'EUR' required

Currency for which payment invoice is created. Currency must be 3 characters in length. Acceptable currencies are: SAR, AED

expiryDatestring date

Expiry date of payment invoice. If not set in request, it is set to a date of 30 days after activation date automatically and the value is returned in response. If activationDate is not set, the date of 30 days after payment invoice creation date is set as expiry date and it is returned in response.

activationDatestring date

Activation date of payment invoice. If not set in request, it is set to null the value is returned in response.

Response

201

{"stackTrail":"paths:/payment-intent/api/v1/direct/eInvoice:post:responses:201:content:application/json:schema:properties:termsAndConditions","oasType":"schema","type":"unknown"}
responseMessagestring
detailedResponseMessagestring
languagestring
responseCodestring
detailedResponseCodestring

Example response

{
  "paymentIntent": {
    "invoiceId": "INV-202604-071247030279",
    "customer": {
      "customerId": "5c1b22c7-afce-4d62-3418-08daffb5fd79",
      "email": "test2@gmail.com",
      "phoneNumber": "511111111",
      "phoneCountryCode": "+966",
      "name": "John",
      "updatedDate": "2023-01-30T19:17:00.1230959Z"
    },
    "eInvoiceDetails": {
      "type": "Detailed",
      "collectCustomersBillingShippingAddress": true,
      "preAuthorizeAmount": true,
      "subtotalWithoutTax": 20,
      "subtotal": 20,
      "grandTotal": 20,
      "extraChargesType": "Amount",
      "chargeDescription": "string",
      "merchantReferenceId": "string",
      "invoiceDiscountType": "Amount",
      "language": "EN",
      "eInvoiceItems": [
        {
          "eInvoiceItemId": "dedd5cc5-3b69-436b-6cc3-08daffb5fdb9",
          "description": "string",
          "price": 10,
          "priceWithDiscount": 10,
          "priceTotal": 10,
          "quantity": 2,
          "sku": "string",
          "itemDiscountType": "Amount",
          "taxType": "Amount",
          "totalWithoutTax": 20,
          "total": 20
        }
      ]
    },
    "paymentIntentId": "3e6b56a1-2d9b-45dc-ac40-08daffad24e3",
    "number": "681954961446",
    "urlSlug": "y1u-w7l-7kx-ave",
    "type": "EInvoice",
    "amount": 20,
    "currency": "SAR",
    "merchantId": "e80ece7e-fb2a-4c0b-de94-08d8a29a107b",
    "merchantPublicKey": "a087f4ca-9890-407b-9c2f-7630836cc020",
    "expiryDate": "2023-02-10T08:54:33.617Z",
    "activationDate": "2023-01-29T08:54:33.617Z",
    "status": "Created",
    "customerId": "5c1b22c7-afce-4d62-3418-08daffb5fd79",
    "isPending": true,
    "createdDate": "2023-01-30T19:17:00.1779812Z",
    "createdBy": "e80ece7e-fb2a-4c0b-de94-08d8a29a107b"
  },
  "responseMessage": "Success",
  "detailedResponseMessage": "The operation was successful",
  "language": "EN",
  "responseCode": "000",
  "detailedResponseCode": "000"
}