Cette page présente des exemples de requêtes et de réponses pour créer des paiements BNPL à l'aide du endpoint Create Payment endpoint le workflow REDIRECT pour les intégrations back-to-back.
Pour tester la création de chaque paiement, vous pouvez copier le contenu du code de requête et l'utiliser sur votre machine ou le coller sur le endpoint Créer un paiement pour le tester à l'aide du Readme.
ImportantCertaines méthodes de payment et certains fournisseurs peuvent n'être disponibles que dans certains pays et/ou certaines devises. Veillez à choisir le bon fournisseur en fonction de vos besoins.
Exemples disponibles à la BNPL
Acuotaz
Exemple de request de payment BNPL à l'aide d'Acuotaz. Vous trouverez ci-dessous des exemples d'une request et de la réponse reçue pour la création d'un payment réussi. La request est présentée au format cURL et la réponse est un objet JSON.
curl --request POST \
--url https://api-sandbox.y.uno/v1/payments \
--header 'X-Idempotency-Key: <your-X-idempotency-key>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'private-secret-key: <your-private-secret-key>' \
--header 'public-api-key: <your-public-api-key>' \
--data '
{
"description": "Payment with Acuotaz",
"account_id":"<account_id>",
"merchant_order_id": "0000022",
"country": "PE",
"additional_data": {
"order": {
"fee_amount": 0,
"items": [
{
"brand": "XYZ",
"category": "Clothes",
"id": "123AD",
"manufacture_part_number": "XYZ123456",
"name": "Skirt",
"quantity": 1,
"sku_code": "8765432109",
"unit_amount": 50
}
],
"shipping_amount": 0
}
},
"amount": {
"currency": "PEN",
"value": 900
},
"customer_payer": {
"merchant_customer_id": "1668863583",
"first_name": "John",
"last_name": "Smith",
"email": "[email protected]"
},
"workflow":"REDIRECT",
"payment_method": {
"type": "ACUOTAZ"
}
}
'{
"id": "1c3c6bee-0230-4989-af06-a2c97c433ac6",
"account_id": "d3d38fc9-49ec-4277-9115-bbad5d17d236",
"description": "Payment with Acuotaz",
"country": "PE",
"status": "READY_TO_PAY",
"sub_status": "CREATED",
"merchant_order_id": "0000022",
"created_at": "2022-11-19T14:25:19.932037Z",
"updated_at": "2022-11-19T14:25:20.940450Z",
"amount": {
"currency": "PEN",
"value": 120
},
"checkout": {
"session": "3d6794b3-dff2-40a3-8e53-981e69f35191",
"sdk_action_required": true
},
"payment_method": {
"vaulted_token": "",
"type": "ACUOTAZ",
"vault_on_success": false,
"token": "",
"payment_method_detail": {
"bnpl": {
"installments": null,
"provider_image": null,
"redirect_url": "https://checkout.sandbox.y.uno/payment?session=ddc821e0-1dc0-497f-a304-32c6a99d7103",
"customer_data": null
}
}
},
"customer_payer": {
"id": "71caa74c-f759-4a7c-a1c4-a983bcf24812",
"merchant_customer_id": "1668863583",
"first_name": "John",
"last_name": "Smith",
"gender": "",
"date_of_birth": null,
"email": "[email protected]",
"nationality": null,
"ip_address": null,
"device_fingerprint": null,
"browser_info": null,
"document": {
"document_type": "DNI",
"document_number": "532924789"
},
"phone": {
"number": "11992149494",
"country_code": "55"
},
"billing_address": null,
"shipping_address": null
},
"additional_data": {
"airline": null,
"order": {
"fee_amount": 40,
"shipping_amount": 10,
"items": [
{
"id": "123AD",
"name": "Skirt",
"quantity": 1,
"unit_amount": 100,
"category": "Clothes",
"brand": "XYZ",
"sku_code": "8765432109",
"manufacture_part_number": "XYZ123456"
}
]
},
"seller_details": null
},
"taxes": null,
"transactions": {
"id": "2fc3d3aa-e5d4-4e52-afdd-edbca07c4733",
"type": "PURCHASE",
"status": "CREATED",
"category": "BUY_NOW_PAY_LATER",
"amount": 120,
"provider_id": "ACUOTAZ",
"payment_method": {
"vaulted_token": "",
"type": "ACUOTAZ",
"vault_on_success": false,
"token": "7946b293-853a-42c8-97f3-a37e72ce230f",
"detail": {
"bnpl": {
"installments": null,
"provider_image": null,
"redirect_url": "https://checkout.sandbox.y.uno/payment?session=ddc821e0-1dc0-497f-a304-32c6a99d7103",
"customer_data": null
}
}
},
"response_code": "SUCCEEDED",
"response_message": "",
"reason": null,
"description": null,
"merchant_reference": null,
"provider_data": {
"id": "ACUOTAZ",
"transaction_id": "2fc3d3aa-e5d4-4e52-afdd-edbca07c4733",
"account_id": "",
"status": "CREATED",
"sub_status": "",
"status_detail": "",
"raw_response": {
"redirect_to": "https://aprt.me/upYm",
"status": "new_order"
}
},
"created_at": "2022-11-19T14:25:19.939870Z",
"updated_at": "2022-11-19T14:25:20.940427Z"
},
"workflow": "REDIRECT"
}Addi
Exemple de request de payment BNPL à l'aide d'Addi. Vous trouverez ci-dessous des exemples d'une request et de la réponse reçue pour la création d'un payment réussi. La request est présentée au format cURL et la réponse est un objet JSON.
curl --request POST \
--url https://api-sandbox.y.uno/v1/payments \
--header 'X-Idempotency-Key: <Your--Idempotency-Key>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'private-secret-key: <your-private-secret-key>' \
--header 'public-api-key: <your-public-api-key>' \
--data '
{
"description": "Payment with Addi",
"account_id":"<account_id>",
"merchant_order_id": "0000022",
"country": "CO",
"amount": {
"currency": "COP",
"value": 52000
},
"customer_payer": {
"first_name": "John",
"last_name": "Smith",
"email":"[email protected]",
"merchant_customer_id": "1234567",
"document": {
"document_type": "CC",
"document_number": "1032765432"
},
"phone":{
"number":"3132450778",
"country_code":"57"
}
},
"workflow":"REDIRECT",
"payment_method": {
"type": "ADDI"
}
}
'{
"id": "087be3a5-bed7-4c58-bbe0-c2ebcf376ebb",
"account_id": "493e9374-510a-4201-9e09-de669d75f256",
"description": "Payment with Addi",
"country": "CO",
"status": "READY_TO_PAY",
"sub_status": "CREATED",
"merchant_order_id": "0000022",
"created_at": "2023-07-20T21:25:11.903819Z",
"updated_at": "2023-07-20T21:25:12.983059Z",
"amount": {
"captured": 0.00,
"currency": "COP",
"refunded": 0.00,
"value": 52000.00
},
"checkout": {
"session": "25e073ae-016c-4bca-89e7-64e05f766f11",
"sdk_action_required": true
},
"payment_method": {
"vaulted_token": "",
"type": "ADDI",
"vault_on_success": false,
"token": "",
"payment_method_detail": {
"bnpl": {
"installments": null,
"provider_image": null,
"redirect_url": "https://checkout.sandbox.y.uno/payment?session=82e244a2-9d5b-4998-93b7-8a293fb43b9c",
"customer_data": null
}
}
},
"customer_payer": {
"id": null,
"merchant_customer_id": "1234567",
"first_name": "John",
"last_name": "Smith",
"gender": null,
"date_of_birth": null,
"email": "[email protected]",
"nationality": null,
"ip_address": null,
"device_fingerprint": null,
"browser_info": {
"user_agent": "",
"accept_header": "",
"accept_content": null,
"accept_browser": null,
"color_depth": "",
"screen_height": "",
"screen_width": "",
"javascript_enabled": null,
"java_enabled": null,
"browser_time_difference": null,
"language": ""
},
"document": {
"document_type": "CC",
"document_number": "1032765432"
},
"phone": {
"number": "3132450778",
"country_code": "57"
},
"billing_address": null,
"shipping_address": null
},
"additional_data": null,
"taxes": null,
"transactions": {
"id": "1328382d-f6e8-4f09-91b7-c18b1308c031",
"type": "PURCHASE",
"status": "CREATED",
"category": "BUY_NOW_PAY_LATER",
"amount": 52000.00,
"provider_id": "ADDI",
"payment_method": {
"vaulted_token": "",
"type": "ADDI",
"vault_on_success": false,
"token": "",
"detail": {
"bnpl": {
"installments": null,
"provider_image": null,
"redirect_url": "https://checkout.sandbox.y.uno/payment?session=82e244a2-9d5b-4998-93b7-8a293fb43b9c",
"customer_data": null
}
}
},
"response_code": "SUCCEEDED",
"response_message": "Transaction successful",
"reason": null,
"description": "Test ADDI",
"merchant_reference": null,
"provider_data": {
"id": "ADDI",
"transaction_id": "0000022",
"account_id": "",
"status": "CREATED",
"sub_status": "",
"status_detail": "",
"response_message": "",
"raw_response": {
"value": ""
},
"third_party_transaction_id": ""
},
"three_d_secure_action_required": null,
"created_at": "2023-07-20T21:25:12.008657Z",
"updated_at": "2023-07-20T21:25:12.918362Z"
},
"split": [],
"workflow": "REDIRECT",
"metadata": [],
"fraud_screening": null
}Klarna
Exemple de demande de paiement BNPL via Klarna. Vous trouverez ci-dessous des exemples de demande et de réponse reçue pour la création d'un paiement réussi. La demande est présentée au format cURL et la réponse est un objet JSON.
curl --request POST \
--url https://api-sandbox.y.uno/v1/payments \
--header 'X-Idempotency-Key: <your-X-idempotency-key>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'private-secret-key: <your-private-secret-key>' \
--header 'public-api-key: <your-public-api-key>' \
--data '
{
"description": "Payment with Klarna",
"account_id": "<account_id>",
"merchant_order_id": "0000022",
"country": "GB",
"amount": {
"currency": "GBP",
"value": 1
},
"customer_payer": {
"merchant_customer_id": "1668863583",
"first_name": "John",
"last_name": "Smith",
"email": "[email protected]"
},
"workflow": "REDIRECT",
"callback_url": "https://www.y.uno",
"payment_method": {
"type": "KLARNA_PAY_OVER_TIME"
},
"additional_data": {
"order": {
"items": [
{
"brand": "XYZ",
"category": "Clothes",
"id": "123AD",
"manufacture_part_number": "XYZ123456",
"name": "Skirt",
"quantity": 1,
"sku_code": "8765432109",
"unit_amount": 3
}
]
}
}
}
'{
"id": "example-payment-id",
"account_id": "example-account-id",
"description": "Payment with Klarna",
"country": "GB",
"status": "READY_TO_PAY",
"sub_status": "CREATED",
"merchant_order_id": "0000022",
"amount": {
"currency": "GBP",
"value": 1.00
},
"checkout": {
"session": "example-session-id",
"sdk_action_required": true
},
"payment_method": {
"vaulted_token": "",
"type": "KLARNA_PAY_OVER_TIME",
"vault_on_success": false,
"token": "",
"payment_method_detail": {
"bnpl": {
"installments": null,
"provider_image": null,
"redirect_url": "https://checkout.sandbox.y.uno/payment?session=example-session-id",
"customer_data": null
}
}
},
"customer_payer": {
"merchant_customer_id": "1668863583",
"first_name": "John",
"last_name": "Smith",
"email": "[email protected]"
},
"workflow": "REDIRECT"
}Wibond
Exemple de request de payment BNPL à l'aide de Wibond. Vous trouverez ci-dessous des exemples d'une request et de la réponse reçue pour la création d'un payment réussi. La request est présentée au format cURL et la réponse est un objet JSON.
curl --request POST \
--url https://api-sandbox.y.uno/v1/payments \
--header 'X-Idempotency-Key: <your-X-idempotency-key>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'private-secret-key: <your-private-secret-key>' \
--header 'public-api-key: <your-public-api-key>' \
--data '
{
"description": "Payment with Wibond",
"account_id": "<account_id>",
"merchant_order_id":"000022",
"country": "AR",
"amount": {
"currency": "ARS",
"value": 52000
},
"customer_payer": {
"merchant_customer_id": "1689888540",
"first_name": "John",
"last_name": "Smith",
"email": "[email protected]"
},
"workflow":"REDIRECT",
"payment_method": {
"type": "WIBOND"
}
}
'{
"id": "2f9d9279-d9cc-451b-bf79-b6d176927b0b",
"account_id": "493e9374-510a-4201-9e09-de669d75f256",
"description": "Payment with Wibond",
"country": "AR",
"status": "READY_TO_PAY",
"sub_status": "CREATED",
"merchant_order_id": "1689888540",
"created_at": "2023-07-20T21:29:00.413927Z",
"updated_at": "2023-07-20T21:29:02.917870Z",
"amount": {
"captured": 0.00,
"currency": "ARS",
"refunded": 0.00,
"value": 52000.00
},
"checkout": {
"session": "76cfacf8-d489-4d6d-bb1d-edaf2f303877",
"sdk_action_required": true
},
"payment_method": {
"vaulted_token": "",
"type": "WIBOND",
"vault_on_success": false,
"token": "",
"payment_method_detail": {
"bnpl": {
"installments": null,
"provider_image": null,
"redirect_url": "https://checkout.sandbox.y.uno/payment?session=64947b6b-5963-431d-bb09-507e8effcc15",
"customer_data": null
}
}
},
"customer_payer": {
"id": null,
"merchant_customer_id": "1689888540",
"first_name": "John",
"last_name": "Smith",
"gender": null,
"date_of_birth": null,
"email": "[email protected]",
"nationality": null,
"ip_address": null,
"device_fingerprint": null,
"browser_info": {
"user_agent": "",
"accept_header": "",
"accept_content": null,
"accept_browser": null,
"color_depth": "",
"screen_height": "",
"screen_width": "",
"javascript_enabled": null,
"java_enabled": null,
"browser_time_difference": null,
"language": ""
},
"document": null,
"phone": null,
"billing_address": null,
"shipping_address": null
},
"additional_data": null,
"taxes": null,
"transactions": {
"id": "eb4d1f14-d004-47a7-a5e9-527062b74b29",
"type": "PURCHASE",
"status": "CREATED",
"category": "BUY_NOW_PAY_LATER",
"amount": 52000.00,
"provider_id": "WIBOND",
"payment_method": {
"vaulted_token": "",
"type": "WIBOND",
"vault_on_success": false,
"token": "",
"detail": {
"bnpl": {
"installments": null,
"provider_image": null,
"redirect_url": "https://checkout.sandbox.y.uno/payment?session=64947b6b-5963-431d-bb09-507e8effcc15",
"customer_data": null
}
}
},
"response_code": "SUCCEEDED",
"response_message": "Transaction successful",
"reason": null,
"description": "Payment with Wibond",
"merchant_reference": null,
"provider_data": {
"id": "WIBOND",
"transaction_id": "6286140",
"account_id": "",
"status": "ACTIVE",
"sub_status": "",
"status_detail": "",
"response_message": "",
"raw_response": {
"amount": 52000,
"created": "2023-07-20T21:29:02.356+0000",
"currency": "ARS",
"externalId": "eb4d1f14-d004-47a7-a5e9-527062b74b29",
"features": "",
"id": 6286140,
"productName": "Payment with Wibond",
"requiresAddressInfo": false,
"shortDescription": "",
"status": "ACTIVE",
"tenant": {
"address": "SANCHEZ",
"addressNumber": "2267",
"address_number": "2267",
"alias": "FRANCO PATRICIO MORELLO",
"city": "empty city",
"country": "ARGENTINA",
"created": "2022-06-24T21:56:57.000+0000",
"creditLimit": 0,
"declaredIngress": 0,
"delayedTransactions": 0,
"email": "[email protected]",
"evalOwnCreditProfile": false,
"floor": "",
"id": 2422650,
"idProvince": 0,
"inProgressTransactions": 0,
"name": "FRANCO PATRICIO MORELLO",
"phone": "+541169018687",
"province": "CIUDAD AUTONOMA BUENOS AIRES",
"receivePayOrders": true,
"signatureType": "INDISTINCT",
"signaturesRequired": 1,
"status": "ACTIVE",
"successfulTransactions": 0,
"taxCondition": 2,
"taxId": "20344005452",
"taxIdType": 86,
"tenantArea": "OTROS",
"type": "PERSONAL",
"typeOptPaymentLink": "TNA_FREE",
"username": "francopatriciomorello",
"verificacionFacta": false,
"verificacionFondos": true,
"verificacionIdIdentification": true,
"verificacionOcde": false,
"verificacionPolitico": false,
"verificacionSujetoObligado": false,
"verificationIdMati": "63f677e52f7b41001c584d93",
"verificationStatusMati": "verified",
"wibondAmount": 446852.4,
"wibondAmountCreation": "2023-02-10T00:00:00.000+0000"
},
"urlCheckout": "https://demo.dev.y.uno/checkout/status?checkoutSession=",
"urlLink": "https://preprod.wibond.co/pay-link/6286140",
"urlNotification": "https://sandbox.y.uno/wibond-webhook/v1/payments/notification",
"urlSuccess": "https://demo.dev.y.uno/checkout/status?checkoutSession=&id=6286140&externalId=eb4d1f14-d004-47a7-a5e9-527062b74b29",
"variations": []
},
"third_party_transaction_id": ""
},
"three_d_secure_action_required": null,
"created_at": "2023-07-20T21:29:00.532790Z",
"updated_at": "2023-07-20T21:29:02.826785Z"
},
"split": [],
"workflow": "REDIRECT",
"metadata": [],
"fraud_screening": null
}