Skip to main content

Hybrid Payment Link

Step 1. Initiate payment and get payment options.

POST /v2/payment-options

{
"country": "DE",
"currency": "EUR",
"amount": 130,
"redirectUrl": "https://merchant.io/where-to-go",
"language": "ES",
"customer": {
"name": "John Doe",
"email": "[email protected]",
"phone": "+34666999666",
"userDevice": "MOBILE",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
"ip": "84.232.140.77",
"address": {
"street": "32 Windsor Gardens",
"streetNumber": "24",
"country": "GB",
"zipCode": "W9 3RG",
"city": "London",
"state": "Great London."
}
}
}

Response: /v2/payment-options

{
"transactionId": "e2094c81-1adb-463b-8e28-ad0cffc7b360",
"sessionId": "8da03dc3-092e-42b2-80e4-37e6571fb3fb",
"paymentOptions": [
{
"paymentOptionId": "4864ab16-2fa4-464a-b692-a74cab45aaf8",
"name": "Card",
"logo": "https://kasha-test.s3.eu-west-1.amazonaws.com/payment-options/4864ab16-2fa4-464a-b692-a74cab45aaf8/card-1664786551844-400px.png",
"extraData": [
{
"label": "Card Number",
"name": "cardnum",
"type": "string",
"values": [],
"required": true
},
{
"label": "Owner",
"name": "cardholder",
"type": "string",
"values": [],
"required": true
},
{
"label": "Expiration Year",
"name": "expiryyear",
"type": "string",
"values": [],
"required": true
},
{
"label": "Expiration Month",
"name": "expirymonth",
"type": "string",
"values": [],
"required": true
},
{
"label": "CVV",
"name": "cardcvv",
"type": "string",
"values": [],
"required": true
}
]
}
]
}

Add paymentOptionId and the sessionId from the prevoius response.

note

Card payment option does not have any sub-options that other payment options may have.

POST /v2/hybrid-payment

{
"sessionId": "8da03dc3-092e-42b2-80e4-37e6571fb3fb",
"paymentOptionId": "4864ab16-2fa4-464a-b692-a74cab45aaf8",
}

Response: /v2/hybrid-payment

{
"statusCode": "300",
"resultType": "redirect",
"result": {
"redirectUrl": "https://cashier.test.kasha.tech/pay?sessionId=8da03dc3-092e-42b2-80e4-37e6571fb3fb",
"transactionId": "e2094c81-1adb-463b-8e28-ad0cffc7b360"
}
}