Saltar al contenido principal

Payments API (1.1.1)

Download OpenAPI specification:Download

API to make payments via premiumpay

Introduction

This API is documented in OpenAPI format and is used to make payments via premiumpay.

Authentication

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.

Callback format

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"
}

Get current version

Responses

Response samples

Content type
application/json
{
  • "status": "ok",
  • "version": "1.0.0"
}

Get status of API, up and running or down

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "status": "ok",
  • "apistatus": "ok"
}

Make payment

Request a new payment link to premiumpay

Authorizations:
bearerAuth
Request Body schema: application/json
required
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

Content type
application/json
{
  • "amount": 10.01,
  • "currency": "EUR",
  • "productDescription": "Product description",
  • "productName": "Product name",
  • "clientOrderId": "12345ORD6789",
  • "clientIP": "154.36.22.12",
  • "clientEmail": "email@demo.com",
  • "cancelurl": "https://demo.com/cancel",
  • "callbackurl": "https://demo.com/callback",
  • "paymentMethods": [
    ],
  • "tokenizer": true,
  • "token": "29e15f05b8225b18358239c306621d52",
  • "expiry": 30,
  • "headers": true
}

Response samples

Content type
application/json
{}