SWITCH ON

DEVELOPER'S HUB

Cash Payments

Payment Code

Enables the generation of a unique payment code that users can present at participating cash points to complete their payment.

Auth-Service API

POST /protocol/openid-connect/token

curl --location --request POST 'https://{{baseUrl}}/auth-service/1.1/protocol/openid-connect/token' \
--header 'x-api-key: {{apikey}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username={{username}}' \
--data-urlencode 'password={{password}}'

200 (OK)

{
    "access_token": "{{access_token}}",
    "expires_in": 300,
    "refresh_expires_in": 1800,
    "refresh_token": "{{refresh_token}}",
    "token_type": "Bearer",
    "not-before-policy": 0,
    "session_state": "{{session_state}}",
    "scope": "profile email"
}

Payment-Methods API

GET /paymentmethodtypes

curl --location --request GET 'https://{{baseUrl}}/payment-methods/1.0/paymentmethodtypes?direction=in&country=PE&paymentMethodTypeClass=cash&paymentMethodTypeStatus=available' \
--header 'X-User-Bearer: {{access_token}}' \
--header 'apikey: {{apikey}}' 

200 (OK)

{
    "amount": "120.00000000",
    "country": "PE",
    "creationDate": "2021-12-22T15:54:40.456575Z",
    "creditParty": {
        "data": {
            "ACCOUNT_ID": "1000001",
            "CURRENCY": "PEN"
        },
        "paymentMethodReference": "3537303934392D313030302D31303031",
        "type": "emoney-pen",
        "typeClass": "emoney",
        "typeCountry": "PE"
    },
    "currency": "PEN",
    "debitParty": {
        "data": {},
        "type": "cashin-pe",
        "typeClass": "cash",
        "typeCountry": "PE"
    },
    "descriptionText": "Cash PE 20/12",
    "fx": {},
    "geoCode": "",
    "metadata": [],
    "modificationDate": "2021-12-22T15:54:41.108747Z",
    "recipientKyc": {},
    "requestDate": "",
    "requestingOrganisationTransactionReference": "185668",
    "requiredAction": {
        "actionType": "paymentcode",
        "data": {
            "additionalInformation": [],
            "code": "77599870"
        },
        "expirationDate": "2021-12-24T15:54:41Z",
        "relatedPaymentMethodData": {
            "paymentMethodType": "cashin-pe",
            "paymentMethodTypeClass": "cash",
            "paymentMethodTypeCountry": "PE",
            "paymentMethodTypeDescription": "Cash"
        },
        "status": "active"
    },
   "senderKyc": {
      "entityReference": 223
    } 
    "subType": "",
    "transactionReference": "1001089",
    "transactionStatus": "waiting",
    "type": "deposit"
}

Transactions API

POST /transactions/type/deposit

curl --location --request POST '{{baseUrl}}/transactions/1.0/transactions/type/deposit' \
--header 'x-api-key: {{apikey}}' \
--header 'X-User-Bearer: {{access_token}}' \
--header 'X-CorrelationID: e051c99b-f91d-4b2f-a08d-5fe62b744669' \
--header 'X-Callback-URL: {{callbackUrl}}' \
--header 'X-Channel: WS' \
--header 'Content-Type: application/json' \
--data-raw '{
  "amount": "120",
  "currency": "PEN",
  "debitParty": {
      "type": "cashin-pe"
  },
  "creditParty": {
    "paymentMethodReference": "{{payment_reference}}"
  },
  "descriptionText": "Cash PE 20/12",
  "requestingOrganisationTransactionReference": "185668",
  "country": "PE"
}'

201 (Created)

{
    "amount": "120.00000000",
    "country": "PE",
    "creationDate": "2021-12-22T15:54:40.456575Z",
    "creditParty": {
        "data": {
            "ACCOUNT_ID": "1000001",
            "CURRENCY": "PEN"
        },
        "paymentMethodReference": "3537303934392D313030302D31303031",
        "type": "emoney-pen",
        "typeClass": "emoney",
        "typeCountry": "PE"
    },
    "currency": "PEN",
    "debitParty": {
        "data": {},
        "type": "cashin-pe",
        "typeClass": "cash",
        "typeCountry": "PE"
    },
    "descriptionText": "Cash PE 20/12",
    "fx": {},
    "geoCode": "",
    "metadata": [],
    "modificationDate": "2021-12-22T15:54:41.108747Z",
    "recipientKyc": {},
    "requestDate": "",
    "requestingOrganisationTransactionReference": "185668",
    "requiredAction": {
        "actionType": "paymentcode",
        "data": {
            "additionalInformation": [],
            "code": "77599870"
        },
        "expirationDate": "2021-12-24T15:54:41Z",
        "relatedPaymentMethodData": {
            "paymentMethodType": "cashin-pe",
            "paymentMethodTypeClass": "cash",
            "paymentMethodTypeCountry": "PE",
            "paymentMethodTypeDescription": "Cash"
        },
        "status": "active"
    },
   "senderKyc": {
      "entityReference": 223
    } 
    "subType": "",
    "transactionReference": "1001089",
    "transactionStatus": "waiting",
    "type": "deposit"
}

Callbacks

PUT /callback URL (waiting)

curl --location --request PUT  '{{callback_URL}}'  \
--header 'x-timestamp: 2022-08-26T19:01:07.609285Z' \
--header 'x-signature: vUddkOuHWdue42gWQxPNO6ZN8h1WmfarhBK4OaUHsYlsPvOzSal08IT2zMJsmbKaOpneHEHE9Lm70d/XpIWG5VglSqA2TX2orpt/qpaIn59yzfUEoEdN8nAVVfspbLadW5VHkDlavhyuWFVPlnridWdl9rjsxg6B44to7NurpFVn4wSSCHbtBqL8IePld3N2AUg/N/7tI6Dk4nWxsB835lbXhGSztXCNozlqOBE5KQslsIWYy0ciZZ8YqHpmXPisy6v0nKA+Ke7QModCRtXtad8WhR/oz+G7cHPtHwZRGF4SCveB2lyD85WyGzCfX9TLhiAs80T51Zj033OQRr0K9Q==' \
--header 'x-correlationid: e051c99b-f91d-4b2f-a08d-5fe62b744669' \ 
--header 'content-type: application/json' \
--header 'content-length: 2948' \
--data-raw '{
    "amount": "12.00000000",
    "conciliationOptions": [
        "finished",
        "error"
    ],
    "confirmed": true,
    "country": "BR",
    "creationDate": "2022-08-29T14:22:48.035585Z",
    "creditParty": {
        "data": {
            "ACCOUNT_ID": "1000158"
        },
        "paymentMethodReference": "3935303035322D313030302D31353436",
        "type": "emoneyin-brl",
        "typeClass": "emoneyin",
        "typeCountry": "BR"
    },
    "currency": "BRL",
    "debitParty": {
        "data": {
            "document_number": "89831500091",
            "first_name": "Michel",
            "gateway": "asaas",
            "last_name": "Costa"
        },
        "type": "cardurlin-br",
        "typeClass": "card",
        "typeCountry": "BR"
    },
    "descriptionText": "Card BR 1/02",
    "fees": {
        "creditPartyEarnedCommission": "0.00000000",
        "creditPartyNetCommission": "0.00000000",
        "creditPartyPaidCommission": "0.00000000",
        "debitPartyEarnedCommission": "0.00000000",
        "debitPartyNetCommission": "0.00000000",
        "debitPartyPaidCommission": "0.00000000"
    },
    "fx": {},
    "geoCode": "",
    "metadata": [
        {
            "creationDate": "2022-08-29T14:22:48Z",
            "key": "SV_TRANSACTION_ID",
            "value": "107343"
        },
        {
            "creationDate": "2022-08-29T14:22:48Z",
            "key": "DEBIT_PARTY_PAID_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T14:22:48Z",
            "key": "CREDIT_PARTY_NET_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T14:22:48Z",
            "key": "DEBIT_PARTY_EARNED_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T14:22:48Z",
            "key": "DEBIT_PARTY_NET_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T14:22:48Z",
            "key": "CREDIT_PARTY_PAID_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T14:22:48Z",
            "key": "CREDIT_PARTY_EARNED_COMMISSION",
            "value": "0.00000000"
        }
    ],
    "modificationDate": "2022-08-29T14:22:48.207674Z",
    "recipientKyc": {},
    "requestDate": "",
    "requestingOrganisationTransactionReference": "185813",
    "requiredAction": {
        "actionType": "redirecturl",
        "data": {
            "additionalInformation": [],
            "redirectURL": "https://..."
        },
        "expirationDate": "2023-08-24T14:22:48Z",
        "relatedPaymentMethodData": {
            "paymentMethodType": "cardurlin-br",
            "paymentMethodTypeClass": "card",
            "paymentMethodTypeCountry": "BR",
            "paymentMethodTypeDescription": "Credit Card URL"
        },
        "status": "active"
    },
    "senderKyc": {},
    "subType": "",
    "transactionReference": "1005505",
    "transactionStatus": "waiting",
    "type": "deposit"
}'

Callbacks

PUT /callback URL (finished)

curl --location --request PUT  '{{callback_URL}}'  \
--header 'connection: close' \
--header 'accept-encoding: gzip' \
--header  'x-timestamp: 2022-08-26T19:01:07.609285Z' \
--header 'x-signature: vUddkOuHWdue42gWQxPNO6ZN8h1WmfarhBK4OaUHsYlsPvOzSal08IT2zMJsmbKaOpneHEHE9Lm70d/XpIWG5VglSqA2TX2orpt/qpaIn59yzfUEoEdN8nAVVfspbLadW5VHkDlavhyuWFVPlnridWdl9rjsxg6B44to7NurpFVn4wSSCHbtBqL8IePld3N2AUg/N/7tI6Dk4nWxsB835lbXhGSztXCNozlqOBE5KQslsIWYy0ciZZ8YqHpmXPisy6v0nKA+Ke7QModCRtXtad8WhR/oz+G7cHPtHwZRGF4SCveB2lyD85WyGzCfX9TLhiAs80T51Zj033OQRr0K9Q==' \
--header 'x-correlationid: e051c99b-f91d-4b2f-a08d-5fe62b744669' \ 
--header 'content-type: application/json' \
--header 'content-length: 2948' \
--data-raw '{
    "amount": "120.00000000",
    "country": "PE",
    "creationDate": "2021-12-22T15:54:40.456575Z",
    "creditParty": {
        "data": {
            "ACCOUNT_ID": "1000001",
            "CURRENCY": "PEN"
        },
        "paymentMethodReference": "3537303934392D313030302D31303031",
        "type": "emoney-pen",
        "typeClass": "emoney",
        "typeCountry": "PE"
    },
    "currency": "PEN",
    "debitParty": {
        "data": {},
        "type": "cashin-pe",
        "typeClass": "cash",
        "typeCountry": "PE"
    },
    "descriptionText": "Cash PE 20/12",
    "fx": {},
    "geoCode": "",
    "metadata": [],
    "modificationDate": "2021-12-22T15:54:41.108747Z",
    "recipientKyc": {},
    "requestDate": "",
    "requestingOrganisationTransactionReference": "185668",
    "requiredAction": {
        "actionType": "paymentcode",
        "data": {
            "additionalInformation": [],
            "code": "77599870"
        },
        "expirationDate": "2021-12-24T15:54:41Z",
        "relatedPaymentMethodData": {
            "paymentMethodType": "cashin-pe",
            "paymentMethodTypeClass": "cash",
            "paymentMethodTypeCountry": "PE",
            "paymentMethodTypeDescription": "Cash"
        },
        "status": "active"
    },
   "senderKyc": {
      "entityReference": 223
    } 
    "subType": "",
    "transactionReference": "1001089",
    "transactionStatus": "waiting",
    "type": "deposit"
}'

Card Payment (direct API)

PCI Certified Merchant can opt for a direct API integration to process a Card payment. This integration flow allows merchants to capture card information within their own channel.

As described in the process bellow, it requires integration to Cardpayment API to send Card information and complete the payment.

The sequence flow for the current process looks as follow:

Auth-Service API

POST /protocol/openid-connect/token

curl --location --request POST 'https://{{baseUrl}}/auth-service/1.0/protocol/openid-connect/token' \
--header 'apikey: {{apikey}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username={{username}}' \
--data-urlencode 'password={{password}}'

200 (OK)

{
    "access_token": "{{access_token}}",
    "expires_in": 300,
    "refresh_expires_in": 1800,
    "refresh_token": "{{refresh_token}}",
    "token_type": "Bearer",
    "not-before-policy": 0,
    "session_state": "{{session_state}}",
    "scope": "profile email"
}

Payment-Methods API

GET /paymentmethodtypes


curl --location --request GET 'https://{{baseUrl}}/payment-methods/1.0/paymentmethodtypes?paymentMethodTypeClass=card' \
--header 'X-User-Bearer: {{access_token}}' \
--header 'apikey: {{apikey}}' 

200 (OK)

[
 {
        "country": "BR",
        "currency": "BRL",
        "directUsage": true,
        "direction": "in",
        "fields": [
            {
                "description": "Card token",
                "fieldType": "input",
                "isUserField": true,
                "mandatory": false,
                "name": "cardToken",
                "regex": ".*",
                "validOptions": []
            },
            {
                "description": "Document number",
                "fieldType": "input",
                "isUserField": true,
                "mandatory": true,
                "name": "document_number",
                "regex": ".*",
                "validOptions": []
            },
            {
                "description": "First name",
                "fieldType": "input",
                "isUserField": true,
                "mandatory": true,
                "name": "first_name",
                "regex": ".*",
                "validOptions": []
            },
            {
                "description": "Last name",
                "fieldType": "input",
                "isUserField": true,
                "mandatory": true,
                "name": "last_name",
                "regex": ".*",
                "validOptions": []
            }
        ],
        "imageURL": null,
        "paymentMethodType": "cardin-br",
        "paymentMethodTypeClass": "card",
        "paymentMethodTypeDescription": "Credit Card Direct",
        "paymentMethodTypePos": [],
        "paymentMethodTypeStatus": "available",
        "protected": false,
        "storable": true,
        "usage": null
    }
]

Transactions API

POST /transactions/type/deposit

curl --location --request POST '{{baseUrl}}/transactions/1.0/transactions/type/deposit' \
--header 'apikey: {{apikey}}' \
--header 'X-User-Bearer: {{access_token}}' \
--header 'X-CorrelationID: e051c99b-f91d-4b2f-a08d-5fe62b744669' \
--header 'X-Callback-URL: {{callbackUrl}}' \
--header 'X-Channel: WS' \
--header 'Content-Type: application/json' \
--data-raw '{
  "amount": "12",
  "currency": "BRL",
  "debitParty": {
      "type": "cardurlin-br",
      "data": {
          "document_number" :"89831500091",
          "first_name": "Michel",
          "last_name" : "Costa"
      }
 },
  "creditParty": {
    "paymentMethodReference": "{{payment_reference}}"
  },
  "descriptionText": "Card BR 1/02",
  "requestingOrganisationTransactionReference": "185813",
  "country": "BR"
}
'

201 (Created)


{
    "amount": "12.00000000",
    "conciliationOptions": [
        "finished",
        "error"
    ],
    "confirmed": true,
    "country": "BR",
    "creationDate": "2022-08-29T15:07:42.710632Z",
    "creditParty": {
        "data": {
            "ACCOUNT_ID": "1000158"
        },
        "paymentMethodReference": "3935303035322D313030302D31353436",
        "type": "emoneyin-brl",
        "typeClass": "emoneyin",
        "typeCountry": "BR"
    },
    "currency": "BRL",
    "debitParty": {
        "data": {
            "document_number": "89831500091",
            "first_name": "Michel",
            "gateway": "asaas",
            "last_name": "Costa"
        },
        "type": "cardin-br",
        "typeClass": "card",
        "typeCountry": "BR"
    },
    "descriptionText": "Card BR 1/02",
    "fees": {
        "creditPartyEarnedCommission": "0.00000000",
        "creditPartyNetCommission": "0.00000000",
        "creditPartyPaidCommission": "0.00000000",
        "debitPartyEarnedCommission": "0.00000000",
        "debitPartyNetCommission": "0.00000000",
        "debitPartyPaidCommission": "0.00000000"
    },
    "fx": {},
    "geoCode": "",
    "metadata": [
        {
            "creationDate": "2022-08-29T15:07:42Z",
            "key": "SV_TRANSACTION_ID",
            "value": "107346"
        },
        {
            "creationDate": "2022-08-29T15:07:42Z",
            "key": "DEBIT_PARTY_PAID_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T15:07:42Z",
            "key": "CREDIT_PARTY_NET_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T15:07:42Z",
            "key": "DEBIT_PARTY_EARNED_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T15:07:42Z",
            "key": "DEBIT_PARTY_NET_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T15:07:42Z",
            "key": "CREDIT_PARTY_PAID_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T15:07:42Z",
            "key": "CREDIT_PARTY_EARNED_COMMISSION",
            "value": "0.00000000"
        }
    ],
    "modificationDate": "2022-08-29T15:07:42.880982Z",
    "recipientKyc": {},
    "requestDate": "",
    "requestingOrganisationTransactionReference": "185813",
    "requiredAction": {
        "actionType": "confirmationserviceurl",
        "data": {
            "additionalInformation": [],
            "postURL": "https://..."
        },
        "expirationDate": "2023-08-24T15:07:42Z",
        "relatedPaymentMethodData": {
            "paymentMethodType": "cardin-br",
            "paymentMethodTypeClass": "card",
            "paymentMethodTypeCountry": "BR",
            "paymentMethodTypeDescription": "Credit Card Direct"
        },
        "status": "active"
    },
    "senderKyc": {},
    "subType": "",
    "transactionReference": "1005508",
    "transactionStatus": "waiting",
    "type": "deposit"
}

Cardpayment API

POST postURL


curl --location --request POST '{{postURL}}' \
--header 'Content-Type: application/json' \
--header 'apikey:{{pciapikey}}' \
--data-raw '{
        "amount": {
        "currency": "BRL",
        "value": "12.00"
    },
    "metadata": [],
    "cardInfo": {
        "name": "Michel Costa",
        "number": "4111111111111111",
        "expirationMonth": "12",
        "expirationYear": "29",
        "cvv": "123"
    }
}'

202 (Accepted)

{
    "paymentReference": "aliquip anim ",
    "description": "et exercitation Excepteur",
    "clientInfo": {
        "clientReference": "Duis aliquip ",
        "clientContact": "sunt velit"
    },
    "amount": {
        "currency": "BRL",
        "value": "12.00"
    },
    "metadata": [],
    "paymentId": "59",
    "status": "PROCESSING"
}

Callbacks

PUT /callback URL (waiting)

curl --location --request PUT  '{{callback_URL}}'  \
--header 'x-timestamp: 2022-08-26T19:01:07.609285Z' \
--header 'x-signature: vUddkOuHWdue42gWQxPNO6ZN8h1WmfarhBK4OaUHsYlsPvOzSal08IT2zMJsmbKaOpneHEHE9Lm70d/XpIWG5VglSqA2TX2orpt/qpaIn59yzfUEoEdN8nAVVfspbLadW5VHkDlavhyuWFVPlnridWdl9rjsxg6B44to7NurpFVn4wSSCHbtBqL8IePld3N2AUg/N/7tI6Dk4nWxsB835lbXhGSztXCNozlqOBE5KQslsIWYy0ciZZ8YqHpmXPisy6v0nKA+Ke7QModCRtXtad8WhR/oz+G7cHPtHwZRGF4SCveB2lyD85WyGzCfX9TLhiAs80T51Zj033OQRr0K9Q==' \
--header 'x-correlationid: e051c99b-f91d-4b2f-a08d-5fe62b744669' \ 
--header 'content-type: application/json' \
--header 'content-length: 2948' \
--data-raw '{
    "amount": "12.00000000",
    "conciliationOptions": [
        "finished",
        "error"
    ],
    "confirmed": true,
    "country": "BR",
    "creationDate": "2022-08-29T15:07:42.710632Z",
    "creditParty": {
        "data": {
            "ACCOUNT_ID": "1000158"
        },
        "paymentMethodReference": "3935303035322D313030302D31353436",
        "type": "emoneyin-brl",
        "typeClass": "emoneyin",
        "typeCountry": "BR"
    },
    "currency": "BRL",
    "debitParty": {
        "data": {
            "document_number": "89831500091",
            "first_name": "Michel",
            "gateway": "asaas",
            "last_name": "Costa"
        },
        "type": "cardin-br",
        "typeClass": "card",
        "typeCountry": "BR"
    },
    "descriptionText": "Card BR 1/02",
    "fees": {
        "creditPartyEarnedCommission": "0.00000000",
        "creditPartyNetCommission": "0.00000000",
        "creditPartyPaidCommission": "0.00000000",
        "debitPartyEarnedCommission": "0.00000000",
        "debitPartyNetCommission": "0.00000000",
        "debitPartyPaidCommission": "0.00000000"
    },
    "fx": {},
    "geoCode": "",
    "metadata": [
        {
            "creationDate": "2022-08-29T15:07:42Z",
            "key": "SV_TRANSACTION_ID",
            "value": "107346"
        },
        {
            "creationDate": "2022-08-29T15:07:42Z",
            "key": "DEBIT_PARTY_PAID_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T15:07:42Z",
            "key": "CREDIT_PARTY_NET_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T15:07:42Z",
            "key": "DEBIT_PARTY_EARNED_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T15:07:42Z",
            "key": "DEBIT_PARTY_NET_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T15:07:42Z",
            "key": "CREDIT_PARTY_PAID_COMMISSION",
            "value": "0.00000000"
        },
        {
            "creationDate": "2022-08-29T15:07:42Z",
            "key": "CREDIT_PARTY_EARNED_COMMISSION",
            "value": "0.00000000"
        }
    ],
    "modificationDate": "2022-08-29T15:07:42.880982Z",
    "recipientKyc": {},
    "requestDate": "",
    "requestingOrganisationTransactionReference": "185813",
    "requiredAction": {
        "actionType": "confirmationserviceurl",
        "data": {
            "additionalInformation": [],
            "postURL": "https://..."
        },
        "expirationDate": "2023-08-24T15:07:42Z",
        "relatedPaymentMethodData": {
            "paymentMethodType": "cardin-br",
            "paymentMethodTypeClass": "card",
            "paymentMethodTypeCountry": "BR",
            "paymentMethodTypeDescription": "Credit Card Direct"
        },
        "status": "active"
    },
    "senderKyc": {},
    "subType": "",
    "transactionReference": "1005508",
    "transactionStatus": "waiting",
    "type": "deposit"
}'

PUT /callback URL (finished)


curl --location --request PUT  '{{callback_URL}}'  \
--header 'connection: close' \
--header 'accept-encoding: gzip' \
--header  'x-timestamp: 2022-08-26T19:01:07.609285Z' \
--header 'x-signature: vUddkOuHWdue42gWQxPNO6ZN8h1WmfarhBK4OaUHsYlsPvOzSal08IT2zMJsmbKaOpneHEHE9Lm70d/XpIWG5VglSqA2TX2orpt/qpaIn59yzfUEoEdN8nAVVfspbLadW5VHkDlavhyuWFVPlnridWdl9rjsxg6B44to7NurpFVn4wSSCHbtBqL8IePld3N2AUg/N/7tI6Dk4nWxsB835lbXhGSztXCNozlqOBE5KQslsIWYy0ciZZ8YqHpmXPisy6v0nKA+Ke7QModCRtXtad8WhR/oz+G7cHPtHwZRGF4SCveB2lyD85WyGzCfX9TLhiAs80T51Zj033OQRr0K9Q==' \
--header 'x-correlationid: e051c99b-f91d-4b2f-a08d-5fe62b744669' \ 
--header 'content-type: application/json' \
--header 'content-length: 2948' \
--data-raw ' {
  "amount": "120.00000000",
  "country": "PE",
  "creationDate": "2021-12-22T15:59:46.657387Z",
  "creditParty": {
    "data": {
      "ACCOUNT_ID": "1000001",
      "CURRENCY": "PEN"
    },
    "paymentMethodReference": "3537303934392D313030302D31303031",
    "type": "emoney-pen",
    "typeClass": "emoney",
    "typeCountry": "PE"
  },
  "currency": "PEN",
  "debitParty": {
    "data": {},
    "type": "cashin-pe",
    "typeClass": "cash",
    "typeCountry": "PE"
  },
  "descriptionText": "Cash PE 20/12",
  "fees": {
    "creditPartyEarnedCommission": "0.00000000",
    "creditPartyNetCommission": "0.00000000",
    "creditPartyPaidCommission": "0.00000000",
    "debitPartyEarnedCommission": "0.00000000",
    "debitPartyNetCommission": "0.00000000",
    "debitPartyPaidCommission": "0.00000000"
  },
  "fx": {},
  "geoCode": "",
  "metadata": [
    {
      "key": "SV_TRANSACTION_ID",
      "value": "102393"
    },
    {
      "key": "DEBIT_PARTY_PAID_COMMISSION",
      "value": "0.00000000"
    },
    {
      "key": "CREDIT_PARTY_NET_COMMISSION",
      "value": "0.00000000"
    },
    {
      "key": "DEBIT_PARTY_NET_COMMISSION",
      "value": "0.00000000"
    },
    {
      "key": "DEBIT_PARTY_EARNED_COMMISSION",
      "value": "0.00000000"
    },
    {
      "key": "CREDIT_PARTY_PAID_COMMISSION",
      "value": "0.00000000"
    },
    {
      "key": "CREDIT_PARTY_EARNED_COMMISSION",
      "value": "0.00000000"
    }
  ],
  "modificationDate": "2021-12-22T16:00:25.906235Z",
  "recipientKyc": {},
  "requestDate": "",
  "requestingOrganisationTransactionReference": "185668",
  "requiredAction": {
    "actionType": "paymentcode",
    "data": {
      "additionalInformation": [],
      "code": "77599870"
    },
    "expirationDate": "2021-12-23T15:59:46Z",
    "relatedPaymentMethodData": {
      "paymentMethodType": "cashin-pe",
      "paymentMethodTypeClass": "cash",
      "paymentMethodTypeCountry": "PE"
    },
    "status": "confirmed"
  },
  "senderKyc": {},
  "subType": "",
  "transactionReference": "1001089",
  "transactionStatus": "finished",
  "type": "deposit"
}'

Card Payment Reversal

Reversals operation can be used to revert a card payment transaction:

  • The transaction is reverted by the total amount.
  • The availability of this feature may vary depending on the payment method used.

Transactions API - Reversals

POST /transactions/{transactionReference}/refunds


curl --location --request POST '{{baseUrl}}/transactions/1.0/transactions/{transactionReference}/reversals' \
--header 'apikey: {{apikey}}' \
--header 'X-User-Bearer: {{access_token}}' \
--header 'X-CorrelationID: e051c99b-f91d-4b2f-a08d-5fe62b744669' \
--header 'X-Callback-URL: {{callbackUrl}}' \
--header 'X-Channel: WS' \
--header 'Content-Type: application/json' \
--data-raw '{
  "descriptionText": "Revert Card Payment",
  "requestingOrganisationTransactionReference": "200000"

}
'

201 (Created)

{
    "amount": "1000.00000000",
    "conciliationOptions": [
        "finished",
        "error"
    ],
    "confirmed": true,
    "country": "UY",
    "creationDate": "2023-10-05T20:39:57.785706Z",
    "creditParty": {
        "data": {
            "address": "street 23 alt 10",
            "city": "Montevideo",
            "document_number": "101010101",
            "document_type": "nationalId",
            "first_name": "Juan",
            "last_name": "Perez",
            "phone": "12345678",
            "state": "Montevideo"
        },,
        "type": "cardurlin-uy",
        "typeClass": "card",
        "typeCountry": "UY"
    },
    "currency": "UYU",
    "debitParty": {
        "data": {
            "ACCOUNT_ID": "1000004"
        },
        "paymentMethodReference": "3937383637362D313030302D31303232",
        "type": "emoneyin-uyu",
        "typeClass": "emoneyin",
        "typeCountry": "UY"
    },
    "descriptionText": "Revert Card Payment",
    "fees": {
        "creditPartyEarnedCommission": "0.00000000",
        "creditPartyNetCommission": "0.00000000",
        "creditPartyPaidCommission": "0.00000000",
        "debitPartyEarnedCommission": "0.00000000",
        "debitPartyNetCommission": "0.00000000",
        "debitPartyPaidCommission": "0.00000000"
    },
    "fx": {},
    "geoCode": "",
    "instructions": "https://...",
    "metadata": [
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "cardToken",
            "value": "ce40da94-75c8-4487-90a6-faae3001f72d"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "cardExpirationMonth",
            "value": "12"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "scoreResult",
            "value": "1"
        },
        {
            "creationDate": "2023-10-05T20:38:14Z",
            "key": "SV_TRANSACTION_ID",
            "value": "113497"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "CommercialServiceProvider",
            "value": "FDUY"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "PaymentType",
            "value": "CREDITCARD"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "ProcessorApprovalCode",
            "value": "796926"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "ProcessorReferenceNumber",
            "value": "796926796926"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "ProcessorTraceNumber",
            "value": "796926"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "TDateFormatted",
            "value": "2023.10.05 22:38:56 (CEST)"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "conciliationId",
            "value": "84638245308"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "terminalId",
            "value": "98000007"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "TransactionResult",
            "value": "APPROVED"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "TransactionTime",
            "value": "1696538336"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "cardProcessStatus",
            "value": "SUCCESS"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "cardPaymentId",
            "value": "2722"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "cardHolderName",
            "value": "JUAN PEREZ"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "authorizationNumber",
            "value": "Y:796926:4638245308:PPXX:7969263771"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "ProcessorResponseCode",
            "value": "00"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "TDate",
            "value": "1696538336"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "Brand",
            "value": "MASTERCARD"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "ProcessorBatchNumber",
            "value": "001"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "ProcessorCCVResponse",
            "value": "X"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "cardNumber",
            "value": "516585XXXXXX0008"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "Country",
            "value": "ARG"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "ProcessorResponseMessage",
            "value": "Function performed error-free"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "cardPaymentStatus",
            "value": "SUCCESS"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "AVSResponse",
            "value": "PPX"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "OrderId",
            "value": "2722"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "ProcessorReceiptNumber",
            "value": "3771"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "cardBrand",
            "value": "mastercard"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "installments",
            "value": "1"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "externalTransactionId",
            "value": "84638245308"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "cardProcessId",
            "value": "84638245308"
        },
        {
            "creationDate": "2023-10-05T20:38:57Z",
            "key": "cardExpirationYear",
            "value": "29"
        }
    ],
    "modificationDate": "2023-10-05T20:39:58.029403Z",
    "paid": false,
    "recipientKyc": {},
    "requestingOrganisationTransactionReference": "200000",
    "requiredAction": {
        "actionType": "awaitconfirmation",
        "data": {
            "additionalInformation": []
        },
        "expirationDate": "2024-09-29T20:39:58Z",
        "relatedPaymentMethodData": {
            "paymentMethodType": "cardurlin-uy",
            "paymentMethodTypeClass": "card",
            "paymentMethodTypeCountry": "UY",
            "paymentMethodTypeDescription": "Tarjeta de Crédito"
        },
        "status": "active"
    },
    "reverts": "221010900",
    "senderKyc": {},
    "subType": "",
    "transactionReference": "221010901",
    "transactionStatus": "waiting",
    "transactionSubStatus": "waiting",
    "type": "reversal"
}

Callback

PUT /callback URL (waiting)

curl --location --request PUT  '{{callback_URL}}'  \
--header 'connection: close' \
--header 'accept-encoding: gzip' \
--header  'x-timestamp: 2022-08-26T19:01:07.609285Z' \
--header 'x-signature: vUddkOuHWdue42gWQxPNO6ZN8h1WmfarhBK4OaUHsYlsPvOzSal08IT2zMJsmbKaOpneHEHE9Lm70d/XpIWG5VglSqA2TX2orpt/qpaIn59yzfUEoEdN8nAVVfspbLadW5VHkDlavhyuWFVPlnridWdl9rjsxg6B44to7NurpFVn4wSSCHbtBqL8IePld3N2AUg/N/7tI6Dk4nWxsB835lbXhGSztXCNozlqOBE5KQslsIWYy0ciZZ8YqHpmXPisy6v0nKA+Ke7QModCRtXtad8WhR/oz+G7cHPtHwZRGF4SCveB2lyD85WyGzCfX9TLhiAs80T51Zj033OQRr0K9Q==' \
--header 'x-correlationid: e051c99b-f91d-4b2f-a08d-5fe62b744669' \ 
--header 'content-type: application/json' \
--header 'content-length: 2948' \
--data-raw '{
    "amount": "120.00000000",
    "country": "PE",
    "creationDate": "2021-12-22T15:54:40.456575Z",
    "creditParty": {
        "data": {
            "ACCOUNT_ID": "1000001",
            "CURRENCY": "PEN"
        },
        "paymentMethodReference": "3537303934392D313030302D31303031",
        "type": "emoney-pen",
        "typeClass": "emoney",
        "typeCountry": "PE"
    },
    "currency": "PEN",
    "debitParty": {
        "data": {},
        "type": "cashin-pe",
        "typeClass": "cash",
        "typeCountry": "PE"
    },
    "descriptionText": "Cash PE 20/12",
    "fx": {},
    "geoCode": "",
    "metadata": [],
    "modificationDate": "2021-12-22T15:54:41.108747Z",
    "recipientKyc": {},
    "requestDate": "",
    "requestingOrganisationTransactionReference": "185668",
    "requiredAction": {
        "actionType": "paymentcode",
        "data": {
            "additionalInformation": [],
            "code": "77599870"
        },
        "expirationDate": "2021-12-24T15:54:41Z",
        "relatedPaymentMethodData": {
            "paymentMethodType": "cashin-pe",
            "paymentMethodTypeClass": "cash",
            "paymentMethodTypeCountry": "PE",
            "paymentMethodTypeDescription": "Cash"
        },
        "status": "active"
    },
   "senderKyc": {
      "entityReference": 223
    } 
    "subType": "",
    "transactionReference": "1001089",
    "transactionStatus": "waiting",
    "type": "deposit"
}'

PUT /callback URL (finished)

curl --location --request PUT  '{{callback_URL}}'  \
--header 'x-timestamp: 2022-08-26T19:01:07.609285Z' \
--header 'x-signature: vUddkOuHWdue42gWQxPNO6ZN8h1WmfarhBK4OaUHsYlsPvOzSal08IT2zMJsmbKaOpneHEHE9Lm70d/XpIWG5VglSqA2TX2orpt/qpaIn59yzfUEoEdN8nAVVfspbLadW5VHkDlavhyuWFVPlnridWdl9rjsxg6B44to7NurpFVn4wSSCHbtBqL8IePld3N2AUg/N/7tI6Dk4nWxsB835lbXhGSztXCNozlqOBE5KQslsIWYy0ciZZ8YqHpmXPisy6v0nKA+Ke7QModCRtXtad8WhR/oz+G7cHPtHwZRGF4SCveB2lyD85WyGzCfX9TLhiAs80T51Zj033OQRr0K9Q==' \
--header 'x-correlationid: e051c99b-f91d-4b2f-a08d-5fe62b744669' \ 
--header 'content-type: application/json' \
--header 'content-length: 2948' \
--data-raw '{
  "amount": "1000.00000000",
  "conciliationOptions": [],
  "confirmed": true,
  "country": "UY",
  "creationDate": "2023-10-05T20:39:57.785706Z",
  "creditParty": {
        "data": {
            "address": "street 23 alt 10",
            "city": "Montevideo",
            "document_number": "101010101",
            "document_type": "nationalId",
            "first_name": "Juan",
            "last_name": "Perez",
            "phone": "12345678",
            "state": "Montevideo"
        },
    "type": "cardurlin-uy",
    "typeClass": "card",
    "typeCountry": "UY"
  },
  "currency": "UYU",
  "debitParty": {
    "data": {
      "ACCOUNT_ID": "1000004"
    },
    "paymentMethodReference": "3937383637362D313030302D31303232",
    "type": "emoneyin-uyu",
    "typeClass": "emoneyin",
    "typeCountry": "UY"
  },
  "descriptionText": "Revert Card Payment",
  "fees": {
    "creditPartyEarnedCommission": "0.00000000",
    "creditPartyNetCommission": "0.00000000",
    "creditPartyPaidCommission": "0.00000000",
    "debitPartyEarnedCommission": "0.00000000",
    "debitPartyNetCommission": "0.00000000",
    "debitPartyPaidCommission": "0.00000000"
  },
  "fx": {},
  "geoCode": "",
  "metadata": [
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "cardToken",
      "value": "ce40da94-75c8-4487-90a6-faae3001f72d"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "cardExpirationMonth",
      "value": "12"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "scoreResult",
      "value": "1"
    },
    {
      "creationDate": "2023-10-05T20:39:59Z",
      "key": "SV_TRANSACTION_ID",
      "value": "113498"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "CommercialServiceProvider",
      "value": "FDUY"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "PaymentType",
      "value": "CREDITCARD"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "ProcessorApprovalCode",
      "value": "796926"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "ProcessorReferenceNumber",
      "value": "796926796926"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "ProcessorTraceNumber",
      "value": "796926"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "TDateFormatted",
      "value": "2023.10.05 22:38:56 (CEST)"
    },
    {
      "creationDate": "2023-10-05T20:39:59Z",
      "key": "card_brand",
      "value": "mastercard"
    },
    {
      "creationDate": "2023-10-05T20:39:59Z",
      "key": "conciliationId",
      "value": "QXYv6HmS._.28566"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "terminalId",
      "value": "98000007"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "TransactionResult",
      "value": "APPROVED"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "TransactionTime",
      "value": "1696538336"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "cardProcessStatus",
      "value": "SUCCESS"
    },
    {
      "creationDate": "2023-10-05T20:39:59Z",
      "key": "cardPaymentId",
      "value": "2723"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "cardHolderName",
      "value": "JUAN PEREZ"
    },
    {
      "creationDate": "2023-10-05T20:39:59Z",
      "key": "authorizationNumber",
      "value": "2722"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "ProcessorResponseCode",
      "value": "00"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "TDate",
      "value": "1696538336"
    },
    {
      "creationDate": "2023-10-05T20:39:59Z",
      "key": "SV_TRANSACTION_ID",
      "value": "113497"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "Brand",
      "value": "MASTERCARD"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "ProcessorBatchNumber",
      "value": "001"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "ProcessorCCVResponse",
      "value": "X"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "cardNumber",
      "value": "516585XXXXXX0008"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "Country",
      "value": "ARG"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "ProcessorResponseMessage",
      "value": "Function performed error-free"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "cardPaymentStatus",
      "value": "SUCCESS"
    },
    {
      "creationDate": "2023-10-05T20:39:59Z",
      "key": "description",
      "value": "Revert Card Payment"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "AVSResponse",
      "value": "PPX"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "OrderId",
      "value": "2722"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "ProcessorReceiptNumber",
      "value": "3771"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "cardBrand",
      "value": "mastercard"
    },
    {
      "creationDate": "2023-10-05T20:39:59Z",
      "key": "transactionReference",
      "value": "221010901"
    },
    {
      "creationDate": "2023-10-05T20:39:59Z",
      "key": "paymentCode",
      "value": "668285660923"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "installments",
      "value": "1"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "externalTransactionId",
      "value": "84638245308"
    },
    {
      "creationDate": "2023-10-05T20:39:59Z",
      "key": "cardProcessId",
      "value": "84638245309"
    },
    {
      "creationDate": "2023-10-05T20:38:57Z",
      "key": "cardExpirationYear",
      "value": "29"
    }
  ],
  "modificationDate": "2023-10-05T20:39:59.649365Z",
  "paid": false,
  "recipientKyc": {},
  "requestingOrganisationTransactionReference": "200000",
  "requiredAction": {
    "actionType": "awaitconfirmation",
    "data": {
      "additionalInformation": []
    },
    "expirationDate": "2024-09-29T20:39:58Z",
    "relatedPaymentMethodData": {
      "paymentMethodType": "cardurlin-uy",
      "paymentMethodTypeClass": "card",
      "paymentMethodTypeCountry": "UY",
      "paymentMethodTypeDescription": "Tarjeta de Crédito"
    },
    "status": "confirmed"
  },
  "reverts": "221010900",
  "senderKyc": {},
  "subType": "",
  "transactionReference": "221010901",
  "transactionStatus": "finished",
  "transactionSubStatus": "finished",
  "type": "reversal"
}'