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. There is no mutability, modifications to totals must be submitted as a new intent.
cURL
meta.payUrl field, the hosted checkout link. Line items are optional. Totals must add up to amountMinor, and taxAmountMinor must equal the sum of line tax.
Hand the payer the link
SendpayUrl to the payer however you already reach them. The page it opens is Natural’s hosted checkout: they enter their card, or use Apple Pay where it is available, and pay the amount shown. Returning payers can pay with a saved card after verifying their email. Natural integrates natively with 3-D Secure and handles the payer receipt.
Follow the payment
Read the intent withGET /payment-intents/{paymentIntentId}. Its status and the embedded cardPayment tell you where the payment stands.
cURL
completed with a succeeded card payment. A declined card leaves the intent open and the card payment failed, with declineCode and declineAdvice saying why and what to do next:
Reconcile
GET /payment-intents lists your intents newest first. Filter by status, createdAfter, and createdBefore, and page with cursor. Pass customerPartyId to list one customer’s intents instead.
cURL
GET /payment-intents/created instead: one feed of every intent you created, whoever it was for.
Every succeeded card payment and every refund also lands in Transactions. A card payment is a payment transaction that relates to its cardPayment, so you can join the settled amount back to the intent; set type=refund on GET /transactions to see only refunds.
Cancel an intent
Cancel an open intent withPOST /payment-intents/{paymentIntentId}/cancel. The checkout link stops working.
cURL
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.