Payment with registered Credit/Debit Card
With a registered payment method, it is already possible to request the payment immediately.
- Obtain the UUID of the registered payment method;
- Payment specifying the payment method.
1. Obtain the UUID of the registered payment method
The UUID of the payment method can be obtained by querying the payment methods saved by the customer2. Payment by sending the payment method
information
Make a payment request by sending the customer's UUID and the payment method UUID.
- Request
- Response
POST /payments
{
"type": "payment",
"amount": 100,
"customer": {
"uuid": "e2343605-cf46-43de-b20b-9b7d1c95a9b2"
},
"paymentMethod": {
"uuid": "90068f83-7623-4de5-91c7-ac447c504ebf"
}
}
{
"apiVersion": "1.4.0",
"date": "2022-01-10T13:04:22+00:00",
"success": true,
"data": {
"id": "42786",
"type": "payment",
"referenceDetails": {
"reference": "A0000A722"
},
"stateDetails": {
"state": "confirmed",
"createdAt": "2022-01-10T10:29:13+00:00"
},
"paymentMethod": {
"uuid": "90068f83-7623-4de5-91c7-ac447c504ebf",
"code": "CC",
"type": "DEFAULT",
"details": {
"phoneNumber": "351#961879263",
"createRegistration": true
}
},
"amount": 10,
"createdAt": "2022-01-10T10:28:14+00:00",
"updatedAt": "2022-01-10T11:39:39+00:00",
"validDate": {
"start": "2022-01-10T10:28:14+00:00",
"end": "2022-07-10T23:59:59+01:00"
},
"availableMethods": [],
"paymentFee": {
"netAmount": "0.00095000",
"taxAmount": "0.00017100"
},
"customer": {
"uuid": "e2343605-cf46-43de-b20b-9b7d1c95a9b2",
"customerId": "agashf123",
"firstName": "José",
"lastName": "Silva",
"email": "email@mail.com",
"createdAt": "2022-01-10T10:28:14+00:00"
}
}
}