Skip to main content
POST
/
payment-auth-requests
cURL
curl --request POST \
  --url https://api-test.klyme.io/api/v1/payment-auth-requests \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "merchantUuid": "<string>",
  "amount": 10.99,
  "currency": "EUR",
  "redirectUrl": "<string>",
  "bankId": "<string>",
  "reference": "<string>",
  "email": "[email protected]",
  "firstName": "<string>",
  "surname": "<string>",
  "mobile": 123,
  "phone": 123,
  "customerId": "<string>",
  "title": "<string>",
  "dob": "2023-12-25",
  "gender": "<string>",
  "company": "<string>",
  "address1": "<string>",
  "address2": "<string>",
  "city": "<string>",
  "postcode": "<string>",
  "country": "FR",
  "cart": [
    "<any>"
  ],
  "discountCode": "<string>",
  "affiliateId": "<string>",
  "custom1": "<string>",
  "custom2": "<string>",
  "custom3": "<string>",
  "custom4": "<string>",
  "custom5": "<string>",
  "customJson": {}
}'
{
  "uuid": "2ae4c7bb76b6e8a323a12ecea143e613"
}
Call this endpoint to create a payment authorisation request and generate a unique uuid that you then insert into the id parameter of the Klyme HTML element. If everything is set up correctly as per the quickstart, you should see something similar to the following. klyme-widget-flow-loaded

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
merchantUuid
string
required
amount
number
required
Example:

10.99

currency
enum<string>
required
Available options:
EUR,
GBP
redirectUrl
string
required

Where the user will be redirected to once the payment has been authorised.

Maximum length: 256
bankId
string
Maximum length: 64
reference
string
Maximum length: 36
email
string<email>
Maximum length: 256
firstName
string
Maximum length: 64
surname
string
Maximum length: 64
mobile
number
phone
number
customerId
string
Maximum length: 32
title
string
Maximum length: 32
dob
string<date>
gender
string
Maximum length: 128
company
string
Maximum length: 128
address1
string
Maximum length: 128
address2
string
Maximum length: 128
city
string
Maximum length: 64
postcode
string
Maximum length: 10
country
string
Required string length: 2
Example:

"FR"

cart
any[]
discountCode
string
Maximum length: 32
affiliateId
string
Maximum length: 32
custom1
string
Maximum length: 128
custom2
string
Maximum length: 128
custom3
string
Maximum length: 128
custom4
string
Maximum length: 128
custom5
string
Maximum length: 128
customJson
object

Response

201 - application/json

Payment authorisation response

uuid
string

If using dedicated bank buttons, an authUrl instead of a uuid will be returned. To learn more about Dedicated Bank Buttons, click here.

Example:

"2ae4c7bb76b6e8a323a12ecea143e613"