Your First Payment
Payments - Capture
API Reference
Integration Guide
Payment Operations
- Core Operations
- Advanced Features
Schemas & Webhooks
Your First Payment
Payments - Capture
To capture the funds for an uncaptured payment
POST
/
payments
/
{payment_id}
/
capture
curl --request POST \
--url https://api.staging.bnplx.io/payments/{payment_id}/capture \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '{
"amount_to_capture": 100,
"capture_metadata": {
"invoice_data": {
"delivery_date": "2024-09-02",
"due_date": "2024-09-02",
"invoice_date": "2024-09-02",
"merchant_buyer_ref": "ACC00002",
"merchant_invoice_ref": "INV-2018000039"
}
}
}'
{
"allowed_payment_method_types": null,
"amount": 9999,
"amount_capturable": 0,
"amount_received": 9999,
"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": "pay_TCgoS5VirsLaTdpVRhyf_1_2",
"capture_method": "manual_multiple",
"capture_on": null,
"charges": null,
"client_secret": "pay_TCgoS5VirsLaTdpVRhyf_secret_HiWDQepqFRgBxajQfsp0",
"connector": "svea",
"connector_capture_id": "412633",
"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": "+49",
"number": "3012345678"
}
},
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"surcharge_details": null,
"unified_code": null,
"unified_message": null,
"updated": "2024-11-11T09:16:14.399Z"
}
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
application/json
Response
200
application/json
Payment captured
The response is of type object
.
curl --request POST \
--url https://api.staging.bnplx.io/payments/{payment_id}/capture \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '{
"amount_to_capture": 100,
"capture_metadata": {
"invoice_data": {
"delivery_date": "2024-09-02",
"due_date": "2024-09-02",
"invoice_date": "2024-09-02",
"merchant_buyer_ref": "ACC00002",
"merchant_invoice_ref": "INV-2018000039"
}
}
}'
{
"allowed_payment_method_types": null,
"amount": 9999,
"amount_capturable": 0,
"amount_received": 9999,
"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": "pay_TCgoS5VirsLaTdpVRhyf_1_2",
"capture_method": "manual_multiple",
"capture_on": null,
"charges": null,
"client_secret": "pay_TCgoS5VirsLaTdpVRhyf_secret_HiWDQepqFRgBxajQfsp0",
"connector": "svea",
"connector_capture_id": "412633",
"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": "+49",
"number": "3012345678"
}
},
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"surcharge_details": null,
"unified_code": null,
"unified_message": null,
"updated": "2024-11-11T09:16:14.399Z"
}