Step 1 - Initiate payment
In this step we will initiate a payment.

- Sandbox URL : https://sandbox.paymee.tn/api/v1/payments/create
- Live URL : https://app.paymee.tn/api/v1/payments/create
- Request method : POST
Header
- Content-Type: application/json
- Authorization: Token api_key (You can get an api_key by creating a sandbox account)
Input
- vendor: Website’s Paymee account number. (integer)
- amount: Payment amount. (float)
- note: Note about the payment (string)
{
"vendor": 5020,
"amount": 120.5,
"note" : "Order #1000132"
}
Output
The token is the identifier of the payment. We will use it in the next step.
{
"status": true,
"message": "Success",
"code": 50,
"data": {
"token": "5d41404b2a76b9719c592e6f84b68d92",
"amount": 10.0
}
}
Step 2 - Open a webview
In this step we will load the Paymee gateway in an iframe. The iframe’s src contains the token as shown below :
Le module en Sandbox affiche le paiement par compte Paymee, seulement, pour effectuer les tests.
Le paiement par carte bancaire sera activé en Production.
- Sandbox URL: https://sandbox.paymee.tn/gateway/5d41404b2a76b9719c592e6f84b68d92
- Live URL: https://app.paymee.tn/gateway/5d41404b2a76b9719c592e6f84b68d92
Buyer test account :
- Phone: 11111111
- Password: 11111111

Once the payment process is done the webview will show the URL “/loader” which contains a loader animation.
When the URL of the webview contains “/loader”, hide the webview and call Step 3
When the URL of the webview contains “/loader”, hide the webview and call Step 3
Step 3 - Check payment
In this step we will check if the payment was really done.

- Sandbox URL: https://sandbox.paymee.tn/api/v1/payments/{token}/check
- Live URL: https://app.paymee.tn/api/v1/payments/{token}/check
- Request method: GET
Header
- Content-Type: application/json
- Authorization: Token api_key (You can get an api_key by creating a sandbox account)
Input
- token: The token received in Step 1
Output
If the buyer uses the wallet to pay, the buyer_id will be filled. Otherwise buyer_id is 0.
{
"status": true,
"message": "Success",
"code": 50,
"data": {
"payment_status": true,
"token": "5d41404b2a76b9719c592e6f84b68d92",
"amount": 3.0,
"transaction_id": 126627,
"buyer_id": 10253
}
}