Capture a Payment When Authorization Expires
When you create a card payment, you may want the option to complete a payment that is not captured yet when its expiration date occurs.
Relevant where the payment method category is card.
Prerequisites
Run the Get Payment Method Required Fields request and verify that it includes the
payment_method_options.expiration_actionparameter.Payment must be in the ACT (active) status.
How
Set the payment_method_options.expiration_action parameter to the value capture (Default value is cancel).
For example:
Request
curl -X post 'https://sandboxapi.rapyd.net/v1/payments/' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'idempotency: your-idempotency-parameter-here' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here' \ --data-raw '{ "amount": 1, "currency": "USD", "capture": false, "description": "demo 3", "customer": { "name": "John Doe" }, "payment_method": { "type": "is_mastercard_card", "fields": { "name": "John Doe", "number": "4111111111111111", "expiration_month": "05", "expiration_year": "29", "cvv": "150" } }, "payment_method_options": { "3d_required": false, "expiration_action": "capture" }, "complete_payment_url": "https://www.demo123456.com/complete", "error_payment_url": "https://www.demo123456.com/error" } '
The platform returns the following response:
Response
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "3b782800-9337-4167-b611-ea603aca848b" }, "data": { "id": "payment_a4d952fd627b60b7f9bafb2a9e5c9b98", "amount": 0, "original_amount": 1, "is_partial": false, "currency_code": "USD", "country_code": "is", "status": "ACT", "description": "demo 3", "merchant_reference_id": "", "customer_token": "cus_e38622094ee36a0fb4a15bfa37af497e", "payment_method": null, "payment_method_data": { "id": null, "type": "is_mastercard_card", "category": "card", "metadata": null, "image": "", "webhook_url": "", "supporting_documentation": "", "next_action": "not_applicable", "name": "John Doe", "last4": "1111", "acs_check": "unchecked", "cvv_check": "fail", "bin_details": { "type": "DEBIT", "brand": "VISA", "level": "GOLD", "issuer": "INTL DEMO ISSUER", "country": "SG", "bin_number": "111111" }, "expiration_year": "29", "expiration_month": "05", "fingerprint_token": "ocfp_99db9bdb7f651194142998782f9032a5", "payment_account_reference": "V0010019205717282424337689253" }, "auth_code": "827443", "expiration": 1770595200, "captured": false, "refunded": false, "refunded_amount": 0, "receipt_email": "", "redirect_url": "", "complete_payment_url": "https://www.demo123456.com/complete", "error_payment_url": "https://www.demo123456.com/error", "receipt_number": "", "flow_type": "", "address": null, "statement_descriptor": "collect-merchant demo", "transaction_id": "", "created_at": 1770028556, "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_f5042c5d4fa2df02b723e18e3bb682e3", "ewallets": [ { "ewallet_id": "ewallet_f5042c5d4fa2df02b723e18e3bb682e3", "amount": 1, "percent": 100, "refunded_amount": 0 } ], "payment_method_options": { "3d_required": false, "expiration_action": "capture" }, "payment_method_type": "is_mastercard_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": "mid_ba20799b5bb3598dd3c4ccd6b97c4ff4", "next_action": "pending_capture", "error_code": "", "remitter_information": {}, "save_payment_method": false, "merchant_advice_code": null, "merchant_advice_message": null } }