Recurring
Under Construction
3. Recurring payments
You can find the recurring PPRO's API info here, for cards specifically, the same concept is followed and you should be able either link and pay and link only with the request example bellow.
Note that unlike the other payment methods, these agreement requests should be sent to our PCI host:
Example request for creating a payment agreement for Cards - LINK ONLY
In this example you register your card payment instrument for a later charge.
Request, POST
/v1/payment-agreements/
:
{
"paymentMethod": "CARD",
"description": "PPRO",
"instrument": {
"type": "RAW_CARD",
"details": {
"brand": "VISA",
"number": "4111111111111111",
"cvv": "123",
"holderName": "John Smith",
"expiryMonth": 1,
"expiryYear": 2024
}
}
Response:
{
"id": "agr_PtAFI2GfLYMhav47h31CI",
"status": "ACTIVE",
"description": "PPRO",
"paymentMethod": "CARD",
"instrumentId": "instr_CT2ljxNmm6OOQAOdPSMA8",
"history": [
{
"id": "ahist_sIVu9Hve6aN1nUq8JYaLt",
"status": "ACTIVE",
"createdAt": "2023-08-23T14:54:19.864Z"
}
],
"createdAt": "2023-08-23T14:54:19.745Z",
"updatedAt": "2023-08-23T14:54:19.863Z"
}
Example request for creating a payment agreement for Cards - LINK AND PAY
In this example you register your card payment instrument and perform the first payment charge in one step.
Request, POST
/v1/payment-agreements/
:
{
"paymentMethod": "CARD",
"description": "PPRO",
"instrument": {
"type": "RAW_CARD",
"details": {
"brand": "VISA",
"number": "4111111111111111",
"cvv": "123",
"holderName": "John Smith",
"expiryMonth": 1,
"expiryYear": 2024
},
"initialPaymentCharge": {
"paymentDescriptor": "Link and Pay initial charge",
"merchantPaymentChargeReference": "MTR12345678",
"amount": {
"value": 10000,
"currency": "BRL"
}
}
}
Response:
{
"id": "agr_6eNKvtgd81ckLmlh1asm2",
"status": "CAPTURED",
"description": "PPRO",
"paymentMethod": "CARD",
"amount": {
"value": 1000,
"currency": "EUR"
},
"instrumentId": "instr_OlnxxCOalfGsRum8m33mo",
"consumer": {
"name": "ABC"
},
"history": [
{
"id": "ahist_ae3WMlHVhfutHpxVq2ZQ6",
"status": "AUTHENTICATION_PENDING",
"createdAt": "2023-08-23T16:42:57.888Z"
}
],
"initialPaymentChargeId": "charge_MGjEXKdhpnblaHeY9qAvU",
"createdAt": "2023-08-23T16:42:57.575Z",
"updatedAt": "2023-08-23T16:42:57.888Z"
}
Updated over 1 year ago