A Two-Step Payment is a way to get card authorization while the customerโs order on your website is being assembled, or processed. The Two-Step Payment flow first authorizes the card, and when the order is shipped, you ask Rapyd to capture the payment.
Example Use Cases:
Creator Economy
You run a creative and creator economy marketplace. You incorporate Two-Step Payments so that customers can fill out their details and authorize the payment once the creator gets to work, crafting the perfect deliverableโฆ Once the project is completed, you trigger the capture process, ensuring that the funds are securely transferred to your account. This streamlined workflow allows creators to focus on delivering exceptional services while providing peace of mind to both you and the customer.
AI One Time Purchase
You offer a subscription for your AI (artificial intelligence) service, but want to offer some one-time payment after their trial period expires. You can offer a one-off payment for your service that generates visuals, resources, marketing materials, and complete resource packages for their corporate wellness and vision retreat. The enterprise company can pay using the Two-Step Payment option, authorizing the card for the total amount of the purchase. This authorization allows you to reserve the funds without capturing them immediately. Once they are happy with the package of their choice and everything is generated they can download the resources and the payment will charge.
E-commerce Order Fulfillment
You own an online store selling handcrafted goods. A customer selects items, chooses Two-Step Payments, and authorizes the card for the purchase amount. As you prepare their order for shipment, you capture the authorized funds, ensuring a streamlined fulfillment process while securing necessary expenses and providing a great customer experience.
Event Registration and Ticketing
You own a popular music festival website with a high demand for tickets. By implementing Two-Step Payments on your event website, your VIP attendees and pre-purchase their tickets by authorizing their cards. With authorized funds reserved, you can confidently plan the event, knowing that costs are covered. As the day tickets drop approaches, capturing the funds ensures a seamless transfer, allowing you to focus on delivering an unforgettable experience while efficiently managing finances.
These are some of the ways Two-Step Payments can work. Here is a request and response related to this payment feature.
Two Step Payments
Use the Create Payment request.
Request
{
"amount": 140,
"currency": "USD",
"payment_method": {
"type": "us_debit_visa_card",
"fields": {
"number": "4111111111111111",
"expiration_month": "12",
"expiration_year": "23",
"name": "John Doe",
"cvv": "345"
},
"metadata": {
"merchant_defined": true
}
},
"capture": false
}
{
"status": {
"error_code": "",
"status": "SUCCESS",
"message": "",
"response_code": "",
"operation_id": "102642c0-9e9a-4679-b834-a5812bc4e698"
},
"data": {
"id": "payment_3bdfd27077f53ae6f18f73647331791f",
"amount": 0,
"original_amount": 140,
"is_partial": false,
"currency_code": "USD",
"country_code": "US",
"status": "ACT",
"description": "",
"merchant_reference_id": "",
"customer_token": "cus_1a04e0ac62d8f7677906bc297cd6483d",
"payment_method": "card_e641a505a496caffe003207b29f76eaa",
"payment_method_data": {
"id": "card_e641a505a496caffe003207b29f76eaa",
"type": "us_debit_visa_card",
"category": "card",
"metadata": {
"merchant_defined": true
},
"image": "",
"webhook_url": "",
"supporting_documentation": "",
"next_action": "not_applicable",
"name": "John Doe",
"last4": "1111",
"acs_check": "unchecked",
"cvv_check": "unchecked",
"bin_details": {
"type": null,
"brand": null,
"level": null,
"issuer": null,
"country": null,
"bin_number": "411111"
},
"expiration_year": "23",
"expiration_month": "12",
"fingerprint_token": "ocfp_2a694038316f52122bbbb3ae926cfda9"
},
"auth_code": null,
"expiration": 1686254423,
"captured": false,
"refunded": false,
"refunded_amount": 0,
"receipt_email": "",
"redirect_url": "",
"complete_payment_url": "",
"error_payment_url": "",
"receipt_number": "",
"flow_type": "",
"address": null,
"statement_descriptor": "Test Business",
"transaction_id": "",
"created_at": 1685649623,
"metadata": {},
"failure_code": "",
"failure_message": "",
"paid": false,
"paid_at": 0,
"dispute": null,
"refunds": null,
"order": null,
"outcome": null,
"visual_codes": {},
"textual_codes": {},
"instructions": [],
"ewallet_id": "ewallet_db4ad4a76278f94c4a83dd9b28b483ed",
"ewallets": [
{
"ewallet_id": "ewallet_db4ad4a76278f94c4a83dd9b28b483ed",
"amount": 140,
"percent": 100,
"refunded_amount": 0
}
],
"payment_method_options": {},
"payment_method_type": "us_debit_visa_card",
"payment_method_type_category": "card",
"fx_rate": 1,
"merchant_requested_currency": null,
"merchant_requested_amount": null,
"fixed_side": "",
"payment_fees": null,
"invoice": "",
"escrow": null,
"group_payment": "",
"cancel_reason": null,
"initiation_type": "customer_present",
"mid": "",
"next_action": "pending_capture",
"error_code": "",
"remitter_information": {},
"save_payment_method": true
}
}
Capture Payment
Use the Capture Payment request
Request
// POST https://sandboxapi.rapyd.net/v1/payments/:payment/capture
Payment: payment_3bdfd27077f53ae6f18f73647331791f
Response
{
"status": {
"error_code": "",
"status": "SUCCESS",
"message": "",
"response_code": "",
"operation_id": "b59d56c5-ab6b-4cda-9306-c71f04d1282d"
},
"data": {
"id": "payment_3bdfd27077f53ae6f18f73647331791f",
"amount": 140,
"original_amount": 140,
"is_partial": false,
"currency_code": "USD",
"country_code": "US",
"status": "CLO",
"description": "",
"merchant_reference_id": "",
"customer_token": "cus_1a04e0ac62d8f7677906bc297cd6483d",
"payment_method": "card_e641a505a496caffe003207b29f76eaa",
"payment_method_data": {
"id": "card_e641a505a496caffe003207b29f76eaa",
"type": "us_debit_visa_card",
"category": "card",
"metadata": {
"merchant_defined": true
},
"image": "",
"webhook_url": "",
"supporting_documentation": "",
"next_action": "not_applicable",
"name": "John Doe",
"last4": "1111",
"acs_check": "unchecked",
"cvv_check": "unchecked",
"bin_details": {
"type": null,
"brand": null,
"level": null,
"issuer": null,
"country": null,
"bin_number": "411111"
},
"expiration_year": "23",
"expiration_month": "12",
"fingerprint_token": "ocfp_2a694038316f52122bbbb3ae926cfda9"
},
"auth_code": null,
"expiration": 1686254423,
"captured": true,
"refunded": false,
"refunded_amount": 0,
"receipt_email": "",
"redirect_url": "",
"complete_payment_url": "",
"error_payment_url": "",
"receipt_number": "",
"flow_type": "",
"address": null,
"statement_descriptor": "Test Business",
"transaction_id": "",
"created_at": 1685649623,
"metadata": {},
"failure_code": "",
"failure_message": "",
"paid": true,
"paid_at": 1685653390,
"dispute": null,
"refunds": null,
"order": null,
"outcome": null,
"visual_codes": {},
"textual_codes": {},
"instructions": [],
"ewallet_id": "ewallet_db4ad4a76278f94c4a83dd9b28b483ed",
"ewallets": [
{
"ewallet_id": "ewallet_db4ad4a76278f94c4a83dd9b28b483ed",
"amount": 140,
"percent": 100,
"refunded_amount": 0
}
],
"payment_method_options": {},
"payment_method_type": "us_debit_visa_card",
"payment_method_type_category": "card",
"fx_rate": 1,
"merchant_requested_currency": null,
"merchant_requested_amount": null,
"fixed_side": "",
"payment_fees": null,
"invoice": "",
"escrow": null,
"group_payment": "",
"cancel_reason": null,
"initiation_type": "customer_present",
"mid": "",
"next_action": "not_applicable",
"error_code": "",
"remitter_information": {},
"save_payment_method": true
}
}