For credit card payments you can use the card information only if your business is Full PCI DSS compliant. Otherwise, you need to collect the card information using Smart Fields. For recurring payments, make a payment with "save": true
and use the card_id
from the response for future payments.
Important
If you are making a payment with credit card information, you need to use the following endpoint instead:
https://api.dlocal.com/secure_paymentsCard payments with a
card_id
ortoken
should use the endpoint: https://api.dlocal.com/payments
Property | Type | Description |
---|---|---|
holder_name | String | Cardholder's full name. Required if token or card_id not present. |
expiration_month | Integer | Two digit number representing the card's expiration month. Required if token or card_id are not present. |
expiration_year | Integer | Four digit number representing the card's expiration year. Required if token or card_id are not present. |
number | String | The card number, as a string without any separators. Required if encrypted_data , token or card_id not present. |
cvv | String | Credit card verification value. Optional. Required for India. |
encrypted_data | String | JWE encrypted params. |
token | String | Temporary credit card token securely created using Smart Fields. |
cvv_token | String | Temporary CVV token securely created using the CVV -only Smart Field |
card_id | String | Credit card ID returned by the Create a Card endpoint. |
installments | String | Number of installments. Default 1 . |
installments_id | String | Installments ID of an installment plan. |
descriptor | String | Dynamic Descriptor. |
verify | Boolean | Validates the user’s card without initiating a payment transaction. To enable this functionality, set verify=true and amount=0 . |
capture | Boolean | Whether or not to immediately capture the charge. When false, the charge issues an authorization and will need to be captured later. Default TRUE . |
save | Boolean | Whether or not to save the card for future payments. The response will include a card_id . Learn more. |
stored_credential_type | String | Use this field to store credentials for future payments. Possible values: * CARD_ON_FILE * SUBSCRIPTION * UNSCHEDULED_CARD_ON_FILE * INSTALLMENTS * NO_SHOW * DELAYED_CHARGES * REAUTHORIZATION * RESUBMISSION See all the information in the Merchant Initiated Transactions page. |
stored_credential_usage | String | Indicates if this is the first time the token is used (an initial payment) or if the token has already been used for a previous payment (subsequent payment). Possible values: * FIRST * USED See all the information in the Merchant Initiated Transactions page. |
Example Object
Example with raw credit card information
{
"holder_name": "Thiago Gabriel",
"expiration_month": 10,
"expiration_year": 2040,
"number": "4111111111111111",
"cvv": "123"
}
Example with Smart Fields token
token
{
"token":"CV-124c18a5-874d-4982-89d7-b9c256e647b5"
}
Example with card_id
from Create a Card method
card_id
from Create a Card method{
"card_id":"CV-hgv23jh4g-n23n-kj3k-bkhb3-kj3hj3gjh3k3"
}