Taking card payments for a customer instead of your own business? Pass their party ID as
customerPartyId on every call below. See Collecting for a
customer.Create the intent
Create the intent withPOST /payment-intents. To change it while it’s open, update the intent; the pay page shows the new total before the payer pays. The checkout of a subscription can’t be updated.
data.attributes.payUrl. You can also include line items and tax.
Hand the payer the link
SendpayUrl to the payer. They can enter a card, use Apple Pay or Google Pay where available, or use a saved card after entering a code sent to their phone. Natural handles checkout, 3-D Secure when its risk check on a typed card asks for it or a saved card is retried after a failed payment, and the receipt.
Follow the payment
Read the intent withGET /payment-intents/{paymentIntentId}. Check its status to see whether it was paid.
completed. Its cardPayment relationship identifies the successful payment. Funds become available after settlement.
Subscribe to paymentIntent.completed, cardPayment.succeeded, and cardPayment.failed webhooks for updates. See Card payments for failed attempts.
Reconcile
List payment intents to review recent activity. Filter by status or creation date. Usecursor for the next page and customerPartyId for a customer’s intents.
Cancel an intent
Cancel an open intent withPOST /payment-intents/{paymentIntentId}/cancel. The checkout link stops working. For cURL, send data.attributes even when empty.
An intent with a payment in progress cannot be canceled, and neither can one that already
completed. Refund a completed payment instead: see Refund a card
payment.