Invoice Link Creation

A guide to use our invoice API.

In case you need to generate invoice links using an API instead of generating it from your Accept dashboard, kindly check the guide below for our invoice link request and response.

URL: https://accept.paymobsolutions.com/api/ecommerce/orders

Method: POST

Source: Merchant's server

Recipient: Accept's server

Content-Type: JSON

Example Request:

{
"auth_token":"AUTH_TOKEN_FROM_STEP_1",    
"api_source":"INVOICE",
"amount_cents":"4000",
"currency":"EGP",
"shipping_data":{
    "first_name":"Test",
    "last_name":"Account",
    "phone_number":"01010101010",
    "email":"[email protected]"
    },
"integrations":[Card_int_ID,wallet_int_ID,kiosk_int_ID,etc...],


"items":
    [
        {
        "name":"ASC1525",
        "amount_cents":"4000",
        "quantity":"1",
        "description":"Smart Watch"
        }
    
    ],

"delivery_needed":"false"

}

Parameter

Value to be entered

auth_token

The authentication token you receive in the first request. Check the first request in the payment API flow.

api_source

You should enter INVOICE as the source of the payment is an invoice link.

amount_cents

The amount in cents to be paid for in the invoice.

currency

The currency used in the invoice. By default, it will be EGP.

shipping_data

The details of the customer or end-user.

integrations

The payment methods that will be listed in the invoice link. You should enter the integration ID of every payment method.

items

It will include the details of the order.

delivery_needed

Determines if you use our delivery. By default, it will be "false".

Example Response:

{
    "id": 18971927,
    "created_at": "2021-10-06T15:10:03.317990",
    "delivery_needed": false,
    "merchant": {
        "id": 15527,
        "created_at": "2020-07-19T16:42:55.700882",
        "phones": [
            "01010101010"
        ],
        "company_emails": [
            "[email protected]"
        ],
        "company_name": "test company name",
        "state": "",
        "country": "EGY",
        "city": "cairo",
        "postal_code": "",
        "street": ""
    },
    "collector": null,
    "amount_cents": 4000,
    "shipping_data": {
        "id": 12953467,
        "first_name": "Test",
        "last_name": "Account",
        "street": " ",
        "building": " ",
        "floor": " ",
        "apartment": " ",
        "city": " ",
        "state": " ",
        "country": " ",
        "email": "[email protected]",
        "phone_number": "01010101010",
        "postal_code": " ",
        "extra_description": " ",
        "shipping_method": "UNK",
        "order_id": 18971927,
        "order": 18971927
    },
    "shipping_details": null,
    "currency": "EGP",
    "is_payment_locked": false,
    "is_return": false,
    "is_cancel": false,
    "is_returned": false,
    "is_canceled": false,
    "merchant_order_id": null,
    "wallet_notification": null,
    "paid_amount_cents": 0,
    "notify_user_with_email": false,
    "items": [
        {
            "name": "ASC1525",
            "description": "Smart Watch",
            "amount_cents": 4000,
            "quantity": 1
        }
    ],
    "order_url": "https://accept.paymobsolutions.com/standalone?ref=i_aYniF",
    "commission_fees": 0,
    "delivery_fees_cents": 0,
    "delivery_vat_cents": 0,
    "payment_method": "tbc",
    "merchant_staff_tag": null,
    "api_source": "INVOICE",
    "pickup_data": null,
    "delivery_status": [],
    "data": {},
    "token": "aYniF",
    "url": "https://accept.paymobsolutions.com/standalone?ref=i_aYniF"
}

Parameter

Definition

id

The ID of the created invoice.

url

The URL of the standalone invoice link.


Did this page help you?