API REFERENCE
...
Payments
Instant payment
Create a payment initiation with whitelabel
3min
Use /whitelabel endpoint in white label mode to return a token, a starting paymentURL and a initiation Id.
POST
Request
Body Parameters
accessKey
String
required
Pre-generated by Klavi for partner
secretKey
String
required
Pre-generated by Klavi for partner
payment
Object
optional
Payment object
Curl
Node.js
JS
Python
Ruby
1require "uri"
2require "json"
3require "net/http"
4
5url = URI("POST https://api-testing.klavi.ai/payment/customerv1/whitelabel")
6
7http = Net::HTTP.new(url.host, url.port);
8request = Net::HTTP::Post.new(url)
9request["Accept"] = "application/json"
10request["Content-Type"] = "application/json"
11request.body = JSON.dump({
12 "accessKey": "string",
13 "secretKey": "string",
14 "payment": "Object"
15})
16
17response = http.request(request)
18puts response.read_body
19
Responses
200
1{
2 "id": "fcb72e3a-b346-4f71-b044-971dc23232c9",
3 "accessToken": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsbLWdhdGV3YXkifQ.2dvWMBcU87IeX4J7S1_bx1uKHsXAvSDaK0RdV9xq3-OSrLA",
4 "paymentURL":"https://payment-test.klavi.ai/?v=rvgvVVDDOYIR81gywJx9h1kBK55",
5}
Shell
1curl --location --request POST 'https://api-testing.klavi.ai/payment/customer/v1/whitelabel' \
2--header 'Accept: application/json' \
3--data-raw '{
4 "accessKey":"youraccesskey",
5 "secretKey":"yoursecretkey",
6 "payment":{
7 "participantId":"ef7320c1-6f96-4af5-9446-92a081b7eac9",
8 "user":{
9 "name":"wenyun Bruno",
10 "taxId":"76109277673"
11 },
12 "amount":"4800"
13 }
14}'
Response
Attribute | Type | Description |
---|---|---|
id | String | Payment initiation identify |
accessToken | String | Token generated, one access token is only valid for one payment Initiation |
paymentURL | String | Dynamic URL generated by Klavi,use this link to redirect the user to complete the payment initiation flow |
Updated 17 Jun 2025
Did this page help you?