Endpoint
Parâmetros
string
required
ID do cliente.
integer
Limita o número de métodos de pagamento retornados. Padrão:
10, máximo: 100.integer
Número da página a ser retornada. Padrão:
1.Resposta
Response
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Retorna todos os métodos de pagamento de um cliente
curl -G https://api.upag.io/v1/customers/cus_ahwDXrgYvur89iPs/payment-methods \
-H "Authorization: Bearer {token}" \
-d page=1 \
-d limit=10
import { Upag } from 'upag';
const upag = new Upag('sk_test_your_api_key');
const paymentMethods = await upag.paymentMethods.listByCustomer('cus_ahwDXrgYvur89iPs', {
limit: 10,
offset: 0
});
10, máximo: 100.1.{
"data": [
{
"id": "pm_abc123xyz",
"livemode": false,
"type": "credit_card",
"expiresIn": null,
"expiryMonth": "12",
"expiryYear": "2025",
"firstDigits": "4111",
"lastDigits": "1111",
"brand": "visa",
"holderName": "JOHN DOE",
"createdAt": 1731622178441,
"updatedAt": 1731622178441
},
{
"id": "pm_pix123xyz",
"livemode": false,
"type": "pix",
"expiresIn": 600,
"expiryMonth": null,
"expiryYear": null,
"firstDigits": null,
"lastDigits": null,
"brand": null,
"holderName": null,
"createdAt": 1731622178441,
"updatedAt": 1731622178441
}
],
"total": 2
}