Create new payment with credit card

Creates a payment with credit card as the payment method.

Use this operation to create the payment and redirect the payer to the invoiceUrl, or to process the card directly through the API. For direct processing, provide the card and cardholder data or a creditCardToken valid for the customer.

When the card is processed during creation, the attempt occurs immediately, regardless of dueDate. If the transaction is not authorized, the payment is not persisted and the API returns HTTP 400.

The creditCardToken replaces creditCard and creditCardHolderInfo and can only be used in payments of the customer for which it was generated. In Production, tokenization must be enabled for the account.

Set a minimum timeout of 60 seconds for this request when the card is processed, reducing the risk of duplicate attempts if the response is delayed.

For installment payments, up to 21 installments are allowed for Visa and Mastercard, and up to 12 installments for other card brands.

When authorizeOnly is true, the amount is only reserved on the card limit and the payment gets the AUTHORIZED status. The capture must be performed later through the pre-authorization capture endpoint. The default reservation period is 3 days and, for eligible accounts, it can be configured for up to 25 days; after this period, the reservation is automatically reversed.

❗️

Direct card processing

If your application captures card data, use HTTPS. Without SSL, the account may be blocked for credit card transactions.

Provide in remoteIp the IP of the payer's device, not the IP of the integration server.

📘

Payment tracking

Creating the payment does not mean the amount is definitively available. Track processing through the payment Webhooks, including risk analysis, confirmation, receipt or capture refusal scenarios.

See the Webhook events for payments.

Related content

Guides

Body Params
string
required

Unique customer identifier in Asaas

string
enum
required

Payment billing type

Allowed:
number
required

Payment amount

date
required

Payment due date

string

Payment description (max. 500 characters)

int32

Days after registration cancellation deadline (only for bank slip)

string

Free search field

int32

Number of installments (only in the case of installment payment)

number

Enter the total amount of a charge that will be paid in installments (only in the case of an installment charge). If this field is sent, the installmentValue is not necessary, the calculation per installment will be automatic.

number

Value of each installment (only in the case of installment payment). Send this field if you want to define the value of each installment.

discount
object

Discount information

interest
object

Interest information for payment after due date

fine
object

Fine information for payment after due date

boolean

Define whether the payment will be sent via post

split
array of objects

Split Settings

split
callback
object

Automatic redirection information after the payment of the link payment

string

Unique identifier of the Pix Automatic authorization in Asaas

creditCard
object

Credit card information

creditCardHolderInfo
object

Credit card holder information

string

Credit card token for using the credit card tokenization functionality

boolean

Carry out only the Pre-Authorization of the payment

string
required

IP from where the customer is making the purchase. Your server's IP must not be entered.

threeDSecure
object

Data to enable 3D Secure authentication on the payment. When informed, the cardholder may be redirected to authenticate with the card issuer before the payment is confirmed.

deviceInfo
object

Cardholder device information, used in 3D Secure authentication for risk analysis by the card issuer

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json