Create, Update, Confirm, and Capture a Payment Intent

Create a Payment Intent | Manual Capture

Creating a payment intent with "capture_method": "manual" places a hold on funds when the customer authorizes the payment, but doesn’t capture the funds without a separate request to Capture a Payment Intent. This separates the authorization and capture process, allowing you to charge the customer now and capture the funds later.

For example, a hotel may authorize a payment in full prior to a guest’s arrival, then move the money when the guest checks out. If the "capture_method": "manual" for the payment intent, the status will move to requires_capture after it has been confirmed.

 1curl -X POST 'https://sandbox-app.tilled.com/v1/payment-intents' \
 2-H 'tilled-account: {{MERCHANT_ACCOUNT_ID}}' \
 3-H 'tilled-api-key: {{SECRET_KEY}}' \
 4-H 'Content-Type: application/json' \
 5-d '{
 6   "amount": 1200,
 7   "currency": "usd",
 8   "capture_method": "manual",
 9   "payment_method_types": [
10"card" ]
11}'

Update a Payment Intent

To make changes to an existing payment intent, you will use the Update a Payment Intent request, this allows you to update various properties associated with the payment intent.

If the payment intent has already been confirmed, you may need to confirm the payment intent again, depending on which properties you update.

1curl -X PATCH 'https://sandbox-app.tilled.com/v1/payment-intents/{{PAYMENT_INTENT_ID}}' \
2-H 'tilled-account: {{MERCHANT_ACCOUNT_ID}}' \
3-H 'tilled-api-key: {{SECRET_KEY}}' \
4-H 'Content-Type: application/json' \
5-d '{
6   "amount": 123500,
7   "payment_method_id": "pm_*******"
8}'

Confirm a Payment Intent

To confirm a payment intent that was not created with "confirm": true, you will use the Confirm a Payment Intent request. This will attempt to initiate a payment.

1curl -X POST 'https://sandbox-app.tilled.com/v1/payment-intents/{{PAYMENT_INTENT_ID}}/confirm' \
2-H 'tilled-account: {{MERCHANT_ACCOUNT_ID}}' \
3-H 'tilled-api-key: {{SECRET_KEY}}' \
4-H 'Content-Type: application/json' \
5-d '{
6   "payment_method_id": "pm_*******"
7}'
The payment_method_id passed in this request is an optional parameter. It is necessary however if a valid payment_method_id has not already been attached to the payment intent (i.e. at creation or after an update).

Capture a Payment Intent

To capture a payment intent that was created with "capture_method": manual, you will need to capture it with the Capture a Payment Intent. This will attempt to collect payment from the customer's payment method.

1curl -X POST 'https://sandbox-app.tilled.com/v1/payment-intents/{{PAYMENT_INTENT_ID}}/capture' \
2-H 'tilled-account: {{MERCHANT_ACCOUNT_ID}}' \
3-H 'tilled-api-key: {{SECRET_KEY}}' \
4-H 'Content-Type: application/json' \
5-d '{
6   "amount_to_capture": "10000",
7   "platform_fee_amount": 1200
8}'