v1

latestOpenAPI 3.1.02026-07-26270268.6 KB

Update Payment invoice

API to update the Payment invoice

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

Request body

paymentIntentIdstring required

Payment Intent ID generated when a new request was created.

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'EGP' | 'SAR' | '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

status'Created' | 'Incomplete' | 'Preauthorized' | 'Paid' | 'Expired' | 'SentToCustomer' | 'PartiallyCompleted'

Status of the Payment Intent. Only SentToCustomer is allowed for merchant to change

Response

200

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

Example response

{
  "paymentIntent": {
    "invoiceId": "INV-202604-071247030279",
    "customer": {
      "customerId": "ed46791d-22da-41f4-7a1c-08daf7e7b5df",
      "email": "test@gmail.com",
      "phoneNumber": "511111111",
      "phoneCountryCode": "+966",
      "name": "John",
      "updatedBy": "PGW",
      "updatedDate": "2023-01-23T21:51:29.2698764Z"
    },
    "eInvoiceDetails": {
      "type": "Detailed",
      "collectCustomersBillingShippingAddress": true,
      "preAuthorizeAmount": true,
      "subtotalWithoutTax": 100,
      "subtotal": 100,
      "grandTotal": 100,
      "extraChargesType": "Amount",
      "chargeDescription": "string",
      "merchantReferenceId": "string",
      "invoiceDiscountType": "Amount",
      "language": "EN",
      "eInvoiceItems": [
        {
          "eInvoiceItemId": "eeeead6c-db54-4906-34eb-08daf7f29d81",
          "description": "string",
          "price": 10,
          "priceWithDiscount": 10,
          "priceTotal": 10,
          "quantity": 10,
          "sku": "string",
          "itemDiscountType": "Amount",
          "taxType": "Amount",
          "totalWithoutTax": 100,
          "total": 100
        }
      ]
    },
    "paymentIntentId": "82249793-ef36-4478-0776-08daf7ec2bc4",
    "number": "901996084874",
    "urlSlug": "62s-g9t-o8i-9cp",
    "type": "EInvoice",
    "amount": 100,
    "currency": "SAR",
    "merchantId": "e80ece7e-fb2a-4c0b-de94-08d8a29a107b",
    "merchantPublicKey": "a087f4ca-9890-407b-9c2f-7630836cc020",
    "expiryDate": "2023-02-10T08:54:33.617Z",
    "activationDate": "2023-02-10T08:54:33.617Z",
    "status": "SentToCustomer",
    "customerId": "ed46791d-22da-41f4-7a1c-08daf7e7b5df",
    "isPending": true,
    "createdDate": "2023-01-23T20:32:53.765755Z",
    "createdBy": "e80ece7e-fb2a-4c0b-de94-08d8a29a107b",
    "updatedDate": "2023-01-23T21:47:03.318728Z",
    "updatedBy": "e80ece7e-fb2a-4c0b-de94-08d8a29a107b"
  },
  "responseMessage": "Success",
  "detailedResponseMessage": "The operation was successful",
  "language": "EN",
  "responseCode": "000",
  "detailedResponseCode": "000"
}