A card transaction can be created by calling the POST /transactions API. The call requires an amount, currency, and a payment_method for the card.

Check out our guides to learn more about payment methods and the ability to tie a payment method to a buyer.

To verify a card is in good standing order before saving it for future use, you can create a transaction with intent=authorize, amount=0, and payment_source=card_on_file.

This API will return the authorized transaction. The status of this transaction can vary for a few reasons including the status provided by the payment service, as well as the requested intent.

Statuses

See our guide on transaction statuses for more details.

Capture

By default a card transaction is only authorized and not automatically captured. A transaction can be captured either directly when creating a transaction, or as a separate API call.

Simultaneous authorize and capture

To capture a transaction immediately, set the intent to capture.

Capture after authorization

Alternatively, it is possible to perform a capture on a previously authorized transaction by calling the POST /transactions/{transaction_id}/capture API.