API Reference
Integration Guide
Payment Operations
- Core Operations
- Advanced Features
Schemas & Webhooks
Payments - Confirm
Use this API to confirm the payment and forward it to the BNPL provider.
Alternatively, you can confirm the payment directly in the Payments/Create API by setting confirm=true
. After confirmation, the payment may result in one of the following outcomes:
Once payments confirm is successfully completed, we will have payment status as requires_capture
or succeeded
indicating the amount for customer is authorized by the BNPL provider
- Fail with a
failed
status. - Transition to a
requires_customer_action
status, along with anext_action
block. - Succeed, with either:
succeeded
(for automatic capture), orrequires_capture
(for manual capture).
BNPL providers typically use methods like
manual_captureor
manual_multiple_capture` for capturing payments, as specified in the Payments Create request.
You can configure routing rules to process specific payments through specific connectors. If you would like to route a specific payment with specific connector you can also pass “connector”: [“connector_name”] to process the payment.
curl --request POST \
--url https://api.staging.bnplx.io/payments/{payment_id}/confirm \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '{
"payment_method": "pay_later",
"payment_method_data": {
"pay_later": {
"invoice": {}
}
},
"payment_method_type": "invoice"
}'
{
"allowed_payment_method_types": null,
"amount": 9999,
"amount_capturable": 9999,
"amount_received": null,
"attempt_count": 1,
"authentication_type": "no_three_ds",
"authorization_count": null,
"billing": {
"address": {
"city": "Frankfurt",
"country": "DE",
"first_name": "John",
"last_name": "Doe",
"line1": "1427",
"line2": "Harrison St",
"line3": "Harrison St",
"state": "Hesse",
"zip": "22100"
},
"email": "guest@example.com",
"phone": {
"country_code": "+91",
"number": "8056594427"
}
},
"browser_info": {
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"color_depth": 24,
"ip_address": "128.0.0.1",
"java_enabled": true,
"java_script_enabled": true,
"language": "nl-NL",
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"
},
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"cancellation_reason": null,
"capture_id": null,
"capture_method": "manual_multiple",
"capture_on": null,
"charges": null,
"client_secret": "pay_TCgoS5VirsLaTdpVRhyf_secret_HiWDQepqFRgBxajQfsp0",
"connector": "svea",
"connector_capture_id": null,
"connector_label": null,
"connector_metadata": null,
"connector_transaction_id": "202401183500",
"created": "2024-11-11T09:12:36.076Z",
"currency": "EUR",
"customer": {
"email": "customer@gmail.com",
"id": "customer123",
"name": "John Doe",
"phone": "30123456789",
"phone_country_code": "+1"
},
"customer_id": "customer123",
"description": null,
"disputes": null,
"email": "customer@gmail.com",
"ephemeral_key": null,
"error_code": null,
"error_message": null,
"expires_on": "2024-11-11T09:27:36.076Z",
"external_3ds_authentication_attempted": false,
"external_authentication_details": null,
"feature_metadata": null,
"fingerprint": null,
"frm_message": null,
"frm_metadata": null,
"incremental_authorization_allowed": null,
"incremental_authorizations": null,
"mandate_data": null,
"mandate_id": null,
"manual_retry_allowed": false,
"merchant_connector_id": "mca_SJ5ikdOQtFw38lIunw2W",
"merchant_decision": null,
"merchant_id": "merchant_test",
"merchant_order_reference_id": null,
"metadata": {
"birth_date": "2001-10-19",
"buyer_type": "private_person",
"gender": "M",
"order_dttm": "2024-09-25 10:10:10.222"
},
"name": "John Doe",
"net_amount": 9999,
"next_action": null,
"off_session": null,
"order_details": [
{
"amount": 10,
"brand": null,
"category": "GOODS",
"product_id": "blabla",
"product_img_link": null,
"product_link": null,
"product_name": "Apple iphone 15",
"product_type": null,
"quantity": 1,
"requires_shipping": null,
"sub_category": null
}
],
"payment_experience": null,
"payment_id": "pay_TCgoS5VirsLaTdpVRhyf",
"payment_link": null,
"payment_method": "pay_later",
"payment_method_data": {
"billing": null,
"pay_later": {
"klarna_sdk": null
}
},
"payment_method_id": null,
"payment_method_status": null,
"payment_method_type": "invoice",
"payment_token": null,
"phone": "30123456789",
"profile_id": "pro_RFKnswEGV8pB0SCa7RZ6",
"reference_id": null,
"refunds": null,
"return_url": "https://google.com/",
"setup_future_usage": null,
"shipping": {
"address": {
"city": "Frankfurt",
"country": "DE",
"first_name": "John",
"last_name": "Doe",
"line1": "1427",
"line2": "Harrison St",
"line3": "Harrison St",
"state": "Hesse",
"zip": "22100"
},
"email": "guest@example.com",
"phone": {
"country_code": "+91",
"number": "3012345678"
}
},
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"status": "requires_capture",
"surcharge_details": null,
"unified_code": null,
"unified_message": null,
"updated": "2024-11-11T09:12:42.300Z"
}
Authorizations
Use the API key created under your merchant account from the GreenBanana dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.
Path Parameters
The identifier for payment
Body
Response
The response is of type object
.
curl --request POST \
--url https://api.staging.bnplx.io/payments/{payment_id}/confirm \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '{
"payment_method": "pay_later",
"payment_method_data": {
"pay_later": {
"invoice": {}
}
},
"payment_method_type": "invoice"
}'
{
"allowed_payment_method_types": null,
"amount": 9999,
"amount_capturable": 9999,
"amount_received": null,
"attempt_count": 1,
"authentication_type": "no_three_ds",
"authorization_count": null,
"billing": {
"address": {
"city": "Frankfurt",
"country": "DE",
"first_name": "John",
"last_name": "Doe",
"line1": "1427",
"line2": "Harrison St",
"line3": "Harrison St",
"state": "Hesse",
"zip": "22100"
},
"email": "guest@example.com",
"phone": {
"country_code": "+91",
"number": "8056594427"
}
},
"browser_info": {
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"color_depth": 24,
"ip_address": "128.0.0.1",
"java_enabled": true,
"java_script_enabled": true,
"language": "nl-NL",
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"
},
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"cancellation_reason": null,
"capture_id": null,
"capture_method": "manual_multiple",
"capture_on": null,
"charges": null,
"client_secret": "pay_TCgoS5VirsLaTdpVRhyf_secret_HiWDQepqFRgBxajQfsp0",
"connector": "svea",
"connector_capture_id": null,
"connector_label": null,
"connector_metadata": null,
"connector_transaction_id": "202401183500",
"created": "2024-11-11T09:12:36.076Z",
"currency": "EUR",
"customer": {
"email": "customer@gmail.com",
"id": "customer123",
"name": "John Doe",
"phone": "30123456789",
"phone_country_code": "+1"
},
"customer_id": "customer123",
"description": null,
"disputes": null,
"email": "customer@gmail.com",
"ephemeral_key": null,
"error_code": null,
"error_message": null,
"expires_on": "2024-11-11T09:27:36.076Z",
"external_3ds_authentication_attempted": false,
"external_authentication_details": null,
"feature_metadata": null,
"fingerprint": null,
"frm_message": null,
"frm_metadata": null,
"incremental_authorization_allowed": null,
"incremental_authorizations": null,
"mandate_data": null,
"mandate_id": null,
"manual_retry_allowed": false,
"merchant_connector_id": "mca_SJ5ikdOQtFw38lIunw2W",
"merchant_decision": null,
"merchant_id": "merchant_test",
"merchant_order_reference_id": null,
"metadata": {
"birth_date": "2001-10-19",
"buyer_type": "private_person",
"gender": "M",
"order_dttm": "2024-09-25 10:10:10.222"
},
"name": "John Doe",
"net_amount": 9999,
"next_action": null,
"off_session": null,
"order_details": [
{
"amount": 10,
"brand": null,
"category": "GOODS",
"product_id": "blabla",
"product_img_link": null,
"product_link": null,
"product_name": "Apple iphone 15",
"product_type": null,
"quantity": 1,
"requires_shipping": null,
"sub_category": null
}
],
"payment_experience": null,
"payment_id": "pay_TCgoS5VirsLaTdpVRhyf",
"payment_link": null,
"payment_method": "pay_later",
"payment_method_data": {
"billing": null,
"pay_later": {
"klarna_sdk": null
}
},
"payment_method_id": null,
"payment_method_status": null,
"payment_method_type": "invoice",
"payment_token": null,
"phone": "30123456789",
"profile_id": "pro_RFKnswEGV8pB0SCa7RZ6",
"reference_id": null,
"refunds": null,
"return_url": "https://google.com/",
"setup_future_usage": null,
"shipping": {
"address": {
"city": "Frankfurt",
"country": "DE",
"first_name": "John",
"last_name": "Doe",
"line1": "1427",
"line2": "Harrison St",
"line3": "Harrison St",
"state": "Hesse",
"zip": "22100"
},
"email": "guest@example.com",
"phone": {
"country_code": "+91",
"number": "3012345678"
}
},
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"status": "requires_capture",
"surcharge_details": null,
"unified_code": null,
"unified_message": null,
"updated": "2024-11-11T09:12:42.300Z"
}