POST
/
initSession

Query Parameters

apiKey
string
required

The API Key of your account.

data
object
required
CallBackUrl
string
required

The URL that will be used to redirect the customer after the payment process is done.

ErrorUrl
string
required

The URL that will be used to redirect the customer after the payment process is failed.

UserDefinedField
array
required

Any value you want to store with the invoice (you can get it later using the Payment Inquiry method). This can be a user identifier or a transaction Id in your system.

InvoiceValue
string
required

The total amount you want the customer to pay.

Suppliers
array
required
SupplierCode
integer
required

Your Supplier Code (you’ll get it after joining DashPay)

Sample: 123.

test
boolean

Set this property to true to send the request to the development environment.

Response properties

success
boolean
required

A boolean value indicates the response status.

test
boolean
required

A boolean value indicates the development environment status.

paymentURL
string
required

The payment URL that you’ll use to redirect the cusotmer to complete the payment. It’s a link for a hosted page that will provide multiple payment methods that can be choosed by the customer to pay the invoice.

Error Codes

Here’s a list of possible error codes of this endpoint.

CodeDescription
1Missing or invalid api key
2CallBackUrl is a required parameter.
3UserDefinedField is a required parameter.
4InvoiceValue is a required parameter.
5Suppliers is a required parameter.
6ErrorUrl is a required parameter.
7CallBackUrl should be a valid URL.
8UserDefinedField should be an array.
9InvoiceValue should be greater than zero.
10Suppliers should be an array.
11ErrorUrl should be a valid URL.