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
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}}'
{
"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
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}}'
[
{
"country": "PE",
"currency": "PEN",
"directUsage": true,
"direction": "in",
"fields": [
{
"description": "Document number",
"fieldType": "input",
"isUserField": true,
"mandatory": false,
"name": "document_number",
"regex": ".*",
"validOptions": []
},
{
"description": "Document type",
"fieldType": "input",
"isUserField": true,
"mandatory": false,
"name": "document_type",
"regex": ".*",
"validOptions": [
"nationalId",
"passport"
]
},
{
"description": "Email",
"fieldType": "input",
"isUserField": true,
"mandatory": false,
"name": "email",
"regex": "^[0-9A-Za-z-_\\.]+@([0-9A-Za-z-_]+\\.)+[0-9A-Za-z-_]{2,5}$",
"validOptions": []
},
{
"description": "Expiration hours",
"fieldType": "input",
"isUserField": false,
"mandatory": false,
"name": "expiration_hours",
"regex": ".*",
"validOptions": []
},
{
"description": "First name",
"fieldType": "input",
"isUserField": true,
"mandatory": false,
"name": "first_name",
"regex": ".*",
"validOptions": []
},
{
"description": "Last name",
"fieldType": "input",
"isUserField": true,
"mandatory": false,
"name": "last_name",
"regex": ".*",
"validOptions": []
},
{
"description": "Cell phone number",
"fieldType": "input",
"isUserField": true,
"mandatory": false,
"name": "phone_number",
"regex": ".*",
"validOptions": []
}
],
"imageURL": "https://inswitchpublic2.s3.amazonaws.com/pago-efectivo-2020.svg",
"paymentMethodType": "pagoefectivocashin-pe",
"paymentMethodTypeClass": "cash",
"paymentMethodTypeDescription": "PagoEfectivo",
"paymentMethodTypePos": [],
"paymentMethodTypeStatus": "available",
"protected": false,
"storable": false,
"usage": "https://inswitchpublic.s3.us-east-2.amazonaws.com/GuiasEfectivo.png"
}
]
Transactions API
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"
}'
{
"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
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"
}'
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"
}'
Updated 1 day ago