Payment gateway

Client token

GET https://api.vendex.app/api/payment_gateway/client_token/

This method is to obtain token from payment gateway.

Headers

Name
Type
Description

Api-Client-Token

string

Client token obtained from client authentication method.

Api-User-Token

string

User token obtained from user login

{
    "status": "success" // or "fail"
    "details": "Successfully retrived payment gatewa client token" // "<fail description>"
    "data": {
        "token" : "xxxxxxxxxxxx"
    }
}

Create transaction

POST https://api.vendex.app/api/payment_gateway/transaction/

This method process payment and create transactions based on customer's payment authorization send from client

Headers

Name
Type
Description

Api-Client-Token

string

Client token obtained from client authentication method.

Api-User-Token

string

User token obtained from user login.

Content-Type

string

Content-type need to be set as application/json.

{
    "status": "success",
    "detail": "Payment gateway transaction successfull",
}

//For fail
{
    "status": "error",
    "detail": "There was a problem processing your card; please double check your payment information and try again",
}

Example of POST data (JSON)

{
    "amount": "100.00",
    "currency_code": "QAR", //optional
    "description": "Credit topup", // optional
    "transaction_data": "xxxxxxxxxxxxxxxxxxx", // Representing customer payment authorization
    "client_data": "xxxxxxxxxxxxxx" // Client data for fraud prevention
}

Last updated

Was this helpful?