Skip to main content
POST
/
sessions
/
{customer_session}
/
payment-methods
curl --request POST \
  --url https://api-sandbox.y.uno/v1/customers/sessions/{customer_session}/payment-methods \
  --header 'Content-Type: application/json' \
  --header 'X-Idempotency-Key: <api-key>' \
  --header 'private-secret-key: <api-key>' \
  --header 'public-api-key: <api-key>' \
  --data '
{
  "payment_method_type": "CARD",
  "country": "US",
  "account_id": "{{account_id}}"
}
'
"{\n    \"id\": \"0395199e-a99c-4a85-acac-6c916f43fa74\",\n    \"account_id\": \"493e9374-510a-4201-9e09-de669d75f256\",\n    \"name\": \"Visa Credit Card\",\n    \"description\": \"Visa Credit Card\",\n    \"type\": \"VISA\",\n    \"category\": \"CARD\",\n    \"country\": \"US\",\n    \"status\": \"READY_TO_ENROLL\",\n    \"created_at\": \"2024-06-06T13:14:18.799434Z\",\n    \"updated_at\": \"2024-06-06T13:14:18.799437Z\",\n    \"enrollment\": {\n        \"session\": \"6641e30d-ca7a-440f-b97c-24231eac6dab\",\n        \"sdk_required_action\": false\n    },\n    \"provider\": {\n        \"id\": \"YUNO\",\n        \"type\": \"YUNO\",\n        \"provider_status\": null\n    },\n    \"customer_payer\": {\n        \"first_name\": \"John\",\n        \"last_name\": \"Doe\",\n        \"email\": \"john.doe@email.com\",\n        \"gender\": \"M\",\n        \"date_of_birth\": \"1990-02-28\",\n        \"document\": {\n            \"document_number\": \"123456789\",\n            \"document_type\": \"SSN\"\n        },\n        \"phone\": {\n            \"number\": \"1234567890\",\n            \"country_code\": \"1\"\n        },\n        \"billing_address\": {\n            \"address_line_1\": \"123 Main St\",\n            \"address_line_2\": \"Apt 4B\",\n            \"country\": \"US\",\n            \"state\": \"NY\",\n            \"city\": \"New York\",\n            \"zip_code\": \"10001\"\n        }\n    },\n    \"verify\": {\n        \"vault_on_success\": false,\n        \"payment\": null\n    },\n    \"preferred\": null\n}\n"
This request enrolls a payment method for a customer. With the information provided by Yuno after the customer selects the payment method to enroll, you will be able to save it for future purchases in the payment method object created. Note that this request requires an X-Idempotency-Key. Check the Authentication.
WebhooksWe recommend listening to Webhooks to stay up to date with the state of the enrolled payment methods of your customers.
In case a customer enrolls the same card twice but with new expiration date or cardholder info, we will unenroll the previously enrolled card and keep the new one.

Available payment methods for enrollment

The following payment methods can be enrolled using this endpoint:
Payment MethodType
CardsCARD
NupayNU_PAY_ENROLLMENT
PayPalPAYPAL_ENROLLMENT
DaviplataDAVIPLATA_ENROLLMENT
MercadoPago WalletWALLET_CONNECT
dLocal YapeYAPE_ENROLLMENT
dLocal Smart PIXSMART_PIX
AstropayASTROPAY_ENROLLABLE
Adyen PIX BiométricoPIX_BIOMETRICO
Payment Method AvailabilityWhen you retrieve the payment methods available to enroll, only the ones which you have connected, created a route, and added to your checkout will be present. For more information about enrollment workflows, see the Enroll Payment Methods guide.

Authorizations

public-api-key
string
header
default:<Your public-api-key>
required
private-secret-key
string
header
default:<Your private-secret-key>
required
X-Idempotency-Key
string
header
default:<Your X-Idempotency-Key>
required

Path Parameters

customer_session
string
required

The customer session that has been created for the enrollment using the Create Customer Session endpoint (UUID, 36 chars).

Body

application/json
account_id
string
required

The unique identifier of the account. You find this information on the Yuno dashboard (UUID, 36 chars).

payment_method_type
enum<string>
required

The payment method type (MAX 255; MIN 3; Payment Type List).

Available options:
CARD,
MERCADO_PAGO_WALLET,
NEQUI,
BANCOLOMBIA_TOKENBOX,
NU_PAY_ENROLLMENT
country
enum<string>
required

The transaction's country code (MAX 2; MIN 2; ISO 3166-1).

Available options:
AR,
BO,
BR,
CL,
CO,
CR,
EC,
SV,
GT,
HN,
MX,
NI,
PA,
PY,
PE,
US,
UY
verify
object

Indicates whether to verify the payment with a verify transaction or not. You’ll need to have a provider defined in your CARD route. False by default. Access the Card Verification page for more details.

Response

201

id
string
Example:

"0395199e-a99c-4a85-acac-6c916f43fa74"

account_id
string
Example:

"493e9374-510a-4201-9e09-de669d75f256"

name
string
Example:

"Visa Credit Card"

description
string
Example:

"Visa Credit Card"

type
string
Example:

"VISA"

category
string
Example:

"CARD"

country
string
Example:

"US"

status
string
Example:

"READY_TO_ENROLL"

created_at
string
Example:

"2024-06-06T13:14:18.799434Z"

updated_at
string
Example:

"2024-06-06T13:14:18.799437Z"

enrollment
object
provider
object
customer_payer
object
verify
object
preferred
any