This API uses Bearer Token for authentication. You need to pass the APIKEY in the header as Authorization.
To get the APIKEY, you need to register on premiumpay.pro (or betandeal.com) and ask admin to be authorized to use the API.
When the payment is done by the user, the callback url provided in /makepayment will be called with the following format (example):
{
"clientOrderId": "12345ORD6789",
"paymentId": 123456,
"amount": 10.01,
"currency": "EUR",
"status": "ok",
"message": "Payment successful",
"paymentMethod": "stripe2",
"token": "29e15f05b8225b18358239c306621d52"
}
Make payment
Request a new payment link to premiumpay
Authorizations:
Request Body schema: application/jsonrequired
| amount required | number <double> Amount to pay |
| currency required | string Currency to pay in |
| productDescription required | string Product description |
| productName required | string Product name |
| clientOrderId required | string Client order id |
| clientIP required | string Client IP |
| clientEmail required | string Client email |
| okurl required | string URL to redirect to on success |
| kourl required | string URL to redirect to on failure |
| cancelurl | string URL to redirect to on cancel |
| callbackurl required | string URL to call on payment status change |
| paymentMethods | Array of strings Payment methods to use |
| tokenizer | boolean Whether to tokenize card or not |
| token | string Token to use for payment |
| expiry | number Number of minutes until payment link expires |
| headers | boolean Whether to show premiumpay headers and footers or not |
Responses
Request samples
- Payload
{- "amount": 10.01,
- "currency": "EUR",
- "productDescription": "Product description",
- "productName": "Product name",
- "clientOrderId": "12345ORD6789",
- "clientIP": "154.36.22.12",
- "clientEmail": "email@demo.com",
- "paymentMethods": [
- "stripe2",
- "bizum"
], - "tokenizer": true,
- "token": "29e15f05b8225b18358239c306621d52",
- "expiry": 30,
- "headers": true
}Response samples
- 200
- 400
- 401
- 403
{- "status": "ok",
- "payment": {
- "paymentid": "123456",
}, - "error": "string"
}