Enable the merchant to add a new invoice and receive the payment URL.

NOTE: This operation must be performed on the server-side. Then send the result payment URL to the client-side.

For test card please visit: https://developer.paylink.sa/test-cards

Log in to see full request history

📘

Sending Digital Product

To use the "Sending Digital Product" feature. First, create a new invoice and set any product of the invoice as a digital product by selecting the "isDigital" attribute to "true."

Body Params

GatewayOrderRequest

double

Amount of the invoice. (mandatory)

string

Call back URL that will be called by the Paylink to the merchant system. This callback URL will receive two parameters: orderNumber, and transactionNo. (mandatory)

string

Call back URL to cancel orders that will be called by the Paylink to the merchant system. This callback URL will receive two parameters: orderNumber, and transactionNo. (mandatory)

string

The client email

string

The client mobile (mandatory)

string

The client name (mandatory)

string

If the currency is not SAR, then send it with the invoice. Paylink will convert it to SAR.

string

The invoice note

string

Unique order number in the merchant system (mandatory)

products
array of objects

List of products of the invoice. This list is optional.

products
Headers
string
required

Access Token

Responses

Response body
object
double

The amount of the invoice in Paylink system

string

The url from Paylink to check the payment status of the order. It require bearer token authentication.

boolean

If order have digital product, this flag will be set to true

double

If the currency is not SAR, then this is the foreign exchange rate to SAR

gatewayOrderRequest
object

This data contains information about the invoice in Paylink system.

double

Amount of the invoice. (mandatory)

string

Call back URL that will be called by the Paylink to the merchant system. This callback URL will receive two parameters: orderNumber, and transactionNo. (mandatory)

string

Call back URL to cancel orders that will be called by the Paylink to the merchant system. This callback URL will receive two parameters: orderNumber, and transactionNo. (mandatory)

string

The client email

string

The client mobile (mandatory)

string

The client name (mandatory)

string

If the currency is not SAR, then send it with the invoice. Paylink will convert it to SAR.

string

The invoice note

string

Unique order number in the merchant system (mandatory)

products
array of objects

List of products of the invoice. This list is optional.

products
object
string

Description of the product. (optional)

string

URL of the product image. (optional)

boolean

If the product is a digital product. (optional)

double

Price of the product. (mandatory)

double

Set product cost which may be used by merchant to calculate the net profit of the product. (optional)

int32

Qty of the product. (mandatory)

double

If the VAT value differs from the standard VAT in Saudi Arabia, we put the specific VAT here. For example, zero VAT or 5 for 5% VAT. The value here is always decimal. The system will always handle it as a percentage value. (optional)

string

Title of the products. (mandatory)

string

The status of the invoice in Paylink system.

Cancelled Declined Paid Pending

paymentErrors
array of objects

The list of errors occurred during payment process

paymentErrors
object
string

The code of the error.

string

The detail message of the error

date-time

The time of the decline.

string

The summery message of the error

string

The payment QR url from Paylink. This url is used to display QR code that open the payment form in the Paylink system.

boolean

If this endpoint operation is success, value will be true

string

Unique transaction number for the created invoice in Paylink system

string

The payment url from Paylink. This url is used to open the payment form in the Paylink system.

201

Created

400

Bad request.

401

Bad credentials

403

Forbidden

404

Not Found

406

Not Acceptable. If the merchant exceed the daily or monthly limit.

Language