It allows you to create a card.
const payload: cardPayload = {
expiry_month: '11',
expiry_year: '2025',
card_holder: 'Duna Developers',
card_holder_dni: '22333444-4',
card_number: '5416752602582580',
card_cvv: '123',
address1: 'Vergara 548',
zip: '001100',
city: 'santiago',
state: 'rm',
country: 'cl',
phone: '12345755'
}
const { data, error } = await checkout.createCard(payload)
It allows you to remove a card.
const { data, error } = await checkout.deleteCard('8aa1bfad-7a51-4870-8800');
It allows you to get a card.
const { data, error } = await checkout.getCard('8XX1XXXX-7a51-4870-8800')
It allows you to get all of the user's cards.
{
data: [
{
id: string,
user_id: string,
card_holder: string,
card_holder_dni: string,
token: string,
company: string,
last_four: string,
expiration_date: string,
created_at: Date,
updated_at: Date,
deleted_at: null
}
]
}
recipes
const { data, error } = await checkout.getCards()
Generated using TypeDoc
Will allow us to use the methods related to your card where we can create a card, obtain a card get all the cards of your users and delete card.