Charge
POST/charge/v2 - Charge JS
Header Parameters
- Accept string required
Data Type
Example: application/json - Content-Type string required
Content Type
Example: application/json - prepayToken string required
payment preparation reference received from AP
Example: e686282e-fad0-45d7-84b6-eff5bf0c126d
- application/json
Body
- It is a numeric code provided by Support in the welcome email
- It has 4 to 7 digits and is common for both environments (test/production).
- Used to verify that the request is legitimate (sent from the merchant).
- Must match the one stored in AP.
- It cannot be repeated between transactions.
- Max. 45 characters - Latin-1 code page (ISO-8859-1)
- Alphanumeric – Max. 80 characters.
- If the amount contains decimals, the period (.) is used as the decimal separator.
- You cannot include a thousands separator.
- In transactions that do not generate monetary movement, such as the registration of a customer's card, zero (0) must be sent as the amount.
- For example, €1,234.56 would be sent 1234.56
- ISO-4217.3 code (EUR, USD, GBP, etc.).
- It is provided in the welcome email.
- Has 6 to 11 numerical digits.
- The product is the one that limits which payment solutions of those activated for commerce are offer to the customer.
- AP allows businesses to have various products configured to their needs.
- If it is not sent, AP will use the first product from the business that is marked in the DB as "default"
- If the merchant does not have any product marked "default" and the parameter is not sent, the request will fail.
- It can be different depending on the environment (test and production).
- For example:
- A business has the card, Bizum and Quix payment solutions activated.
- The business has two products, one for national customers with all payment solutions activated, and another for international customers with only card payment.
- The merchant indicates the identifier of one or another product in the request depending on the nationality of your client
- With this, it avoids offering payment solutions such as Bizum or Quix, which can only operate with national clients, to international clients.
- If it is sent in the request, it will have priority over the one configured in the Addon Payments administration panel.
- Alphanumeric – Max. 2048 characters.
- Alphanumeric – Max. 2048 characters.
- If it is sent in the request, it will have priority over the one configured in the Addon Payments administration panel.
- If it is not sent in the request, the client will be redirected to the URL configured in the module administration.
- Alphanumeric – Max. 2048 characters.
- If it is sent in the request, it will have priority over the one configured in the Addon Payments administration panel.
- If it is not sent in the request, the client will be redirected to the URL configured in the module administration.
- Alphanumeric – Max. 2048 characters.
- If it is sent in the request, it will have priority over the one configured in the Addon Payments administration panel.
- If it is not sent in the request, the client will be redirected to the URL configured in the module administration.
- Alphanumeric – Max. 2048 characters.
- Alphanumeric – Max. 500 characters
- Parameters are sent in the following format: Key1:Value1;Key2:Value2;KeyN:ValueN
- The parameters that are sent will be received back in the “optionalTransactionParams” field of the response.
- Max. 1000 characters, Latin-1 code page (ISO-8859-1)
- It can be useful to locate or identify it later in the AP management panel.
Identifier of your business on the AP platform.
Javascript password.
Transaction identifier in your trading platform electronic. It is used for your platform to link the notifications received with the customer's order.
ID. of the customer in your e-commerce platform.
Amount of the transaction.
Possible values: [EUR, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNH, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, FJD, FKP, GBP, GEL, GGP, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IMP, INR, IQD, IRR, ISK, JEP, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XCD, XDR, XOF, XPD, XPF, XPT, YER, ZAR, ZMW, ZWL]
Currency of the transaction.
Possible values: [AF, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CY, CZ, DK, DJ, DM, DO, TP, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IL, IT, JM, JP, JO, KZ, KE, KI, KP, KR, KV, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, MS, ME, MA, MZ, MM, NA, NR, NP, NL, AN, NC, NZ, NI, NE, NG, NU, NF, MP, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, SH, KN, LC, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SK, SI, SB, SO, ZA, GS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW]
Country from which the transaction is sent. * ISO 3166-1 alpha-2 code (ES, US, UK, etc.).
Name of the payment solution through which the transaction must be processed (creditcards, bizum, paypal, etc.).
Possible values: [5]
Addon Payments Gateway API version by which the transaction should be processed.
Highly Recommended identifier of the product created in your business in AP for which it must be processed the transaction.
Highly Recommended URL of your e-commerce platform where AP will send the notification with the status of the transaction.
Highly Recommended Return URL to the merchant's website to which the customer will be redirected if the transaction is authorized.
Highly Recommended Return URL to the merchant's website to which to redirect the customer if the transaction is denied.
Highly Recommended Return URL to the merchant's website to which the customer will be redirected if they cancel the transaction.
Return URL to the merchant's website to which the customer will be redirected if the transaction is pending processing by the payment solution.
Parameters sent by your e-commerce platform to modify the transaction management in AP
Description of the transaction.
Possible values: [true, false]
Show the end customer a receipt in the optional redirection process.
Possible values: [false, true]
Indicates whether or not to save the customer's card token. If you don't want to save the card, use "false"
Variable reference for businesses that need FB500 reconciliation files.
- 200
- Json
- Schema
- Example (from schema)
Schema
- Array [
- ISO-4217.3 code (EUR, USD, GBP, etc.).
- Alphanumeric – 6 characters.
- Alphanumeric – Max. 1024 characters.
- The format and values depend on each payment solution.
- Numeric – Max. 19 digits
- 4907270002222227 → 490727******2227
- Alphanumeric – 16~20 characters.
- Numeric – 4 digits.
- Format: MMYY - MM the two digits of the month and YY the last two digits of the year.
- For example: June 2023 → 0623
- Array [
- ]
- When this parameter is received, the “service” parameter will not be received.
- The format depends on each payment solution.
- Only available at some card issuers.
- Only available at some card issuers.
- When this parameter is received, the “paymentSolution” parameter will not be received
- ]
response object
operations object[]
Payment Amount
Possible values: [EUR, AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNH, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, FJD, FKP, GBP, GEL, GGP, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IMP, INR, IQD, IRR, ISK, JEP, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VEF, VES, VND, VUV, WST, XAF, XAG, XAU, XCD, XDR, XOF, XPD, XPF, XPT, YER, ZAR, ZMW, ZWL]
Currency of the transaction.
Possible values: [ACCOUNT_REGISTRATION, DEBIT, REFUND, REBATE, CREDIT, CANCEL_WITHDRAWAL]
Operation Type
Possible values: [INITIATED, PENDING, TO_CAPTURE, SUCCESS, SUCCESS_WARNING, ERROR, VOIDED, REBATED, REJECTED, REDIRECTED, AWAITING_PAYSOL, SUCCESS3DS, ERROR3DS, FAIL, N/A (Not Applicable)]
Status of the transaction after being managed by the payment solution or service
Authorization code of the issuer for card payments.
Raw response from the payment solution.
mpi object
Result of the authentication attempt
Original response code of the payment solution.
paymentDetails object
Portfolio or customer account number
Card holder
Masked card number
Customer card reference generated by AP.
Possible values: [VISA, MASTERCARD, AMEX]
Brand of the card.
Expiration date of the card
extraDetails object[]
Data key
Data value
Name of the bank issuing the card.
Country of the bank issuing the card.
Original message of the response of the payment solution or service that has managed the transaction.
Name of the payment solution that has managed the transaction.
Transaction identifier in the payment solution.
Additional data from the response.
Message received together with the additional data of the response.
URL to which your e-commerce platform has to redirect the customer to complete the payment.
respCode object
AP response messages.
AP internal UUID generated for the transaction.
Name of the service that has managed the transaction.
Identifier for recurring payments.
workFlowResponse object
Internal identifier of the workflow in AP.
Name of the workflow.
Version of the workflow.
{
"response": {
"message": "WorkFlow has finished successfully, for transaction Id: 7545460",
"operations": [
{
"amount": "30.00",
"currency": "EUR",
"merchantTransactionId": "44950041",
"operationType": "DEBIT",
"payFrexTransactionId": "string",
"sorted-order": "1",
"status": "SUCCESS",
"authCode": "555579",
"details": "{\"resultCode\":\"00000\",\"resultDescription\":\"OK\",\"values\":{\"rfTransactionCurrency\":\"EUR\",\"rfRTS\":\"355534686 790190 689749 230621145440\",\"rfContactlessLogo\":\"false\",\"rfOperationType\":\"Settle\",\"rfAuthMode\":\"On\",\"rfDataEntryMode\":\"Manual\",\"rfCardHolderVerificationMode\":\"No\",\"rfFuc\":\"355534686\",\"rfTerminalID\":\"00000500\",\"rfProcessor\":\"Redsys\",\"rfMerchantCity\":\"BARCELONA\",\"rfMerchantPostalCode\":\"08014\",\"rfMerchantAddress\":\"GRAN VIA DE LES CORTS CATALANE, 159 PLANTA 7\",\"rfMaskedPan\":\"************0014\",\"rfOperationDateTime\":\"21/06/23 14:54:40\",\"rfTerminalOperationNumber\":\"0116\",\"rfAuthNumber\":\"555579\",\"rfTransactionAmountCurrency\":\"36,00 EUR\",\"rfProcessorMessage\":\"\",\"rfPrintSignatureBox\":\"false\",\"rfCardPresent\":\"true\",\"rfReferenceId\":\"0116\",\"posTransactionToken\":\"{\\\"pucIdMsg\\\":\\\"1200\\\",\\\"pucP3ProcessCode\\\":\\\"000000\\\",\\\"pucP4OriginalAmount\\\":\\\"000000003600\\\",\\\"pucP11TransactionNumber\\\":\\\"689749\\\",\\\"pucP12LocalDateTime\\\":\\\"230621145440\\\",\\\"pucP22ServicePointData\\\":\\\"1U00506K3000\\\",\\\"pucP38AuthNumber\\\":\\\"555579\\\",\\\"pucP39ActionCode\\\":\\\"000\\\",\\\"pucP53SecurityControlInfo\\\":\\\"0102000001000000\\\",\\\"pinpadId\\\":\\\"1639\\\",\\\"pinpadAcquirerId\\\":\\\"00000500\\\",\\\"pinpadManufacturer\\\":null,\\\"pinpadModel\\\":null,\\\"pinpadSerialNumber\\\":null,\\\"pinpadSoftwareName\\\":null,\\\"pinpadSoftwareVersion\\\":null,\\\"pinpadKernelEmv\\\":null,\\\"pinpadVccStrip\\\":null,\\\"pinpadVerPup\\\":null,\\\"pinpadPciStage\\\":null,\\\"pinpadVerEmvParams\\\":null,\\\"pinpadEmvType\\\":null,\\\"pinpadCapabilities\\\":null,\\\"pinpadLanguage\\\":null,\\\"transactionType\\\":\\\"O\\\",\\\"transactionContactless\\\":\\\"0\\\",\\\"transactionDcc\\\":\\\"0\\\",\\\"transactionDccComission\\\":null,\\\"transactionDccExchangeRate\\\":null,\\\"transactionDccMarkUp\\\":null,\\\"transactionDccEntity\\\":null,\\\"transactionDccBceExchangeRate\\\":null,\\\"transactionDccBceMarkUp\\\":null,\\\"transactionPanSequenceNumber\\\":null,\\\"transactionTerminalOperationNumber\\\":\\\"0116\\\",\\\"transactionResponseCode\\\":null,\\\"transactionCurrency\\\":\\\"978\\\",\\\"transactionFuc\\\":\\\"355534686\\\",\\\"cardMaskedPan\\\":\\\"************0014\\\",\\\"cardAid\\\":null,\\\"cardDdfName\\\":null,\\\"cardApplicationLabel\\\":null,\\\"cardCypherData\\\":null}\",\"OperationResult\":\"000\"},\"threeDsProtocolVersion\":\"2.2.0\"}\n",
"mpi": {
"eci": "06"
},
"paymentCode": "nsA4",
"paymentDetails": {
"account": "string",
"cardHolderName": "First name Last name",
"cardNumber": "490727******2227",
"cardNumberToken": "8956861270870014",
"cardType": "VISA",
"expDate": "0623",
"extraDetails": [
{
"key": "rememberMe",
"value": "true"
}
],
"issuerBank": "EXTRAS TEST - VISA",
"issuerCountry": "ES"
},
"paymentMessage": "Operación finalizada con éxito",
"paymentSolution": "caixapucpuce",
"paySolTransactionId": "38b8a363-8800-422c-accf-c6030d805ec2",
"rad": "string",
"radMessage": "string",
"redirectionResponse": "redirect:https://checkout.stg-eu-west3.epgint.com/EPGCheckout/rest/online/3dsv2/redirect?action=gatherdevice¶ms=eyJ0aHJlZURTdjJUb2tlbiI6IjU3OWZhNzNjLWUxMGYtNGVmOS1iYTkyLTAyYTk5ZjAxYTA5YyIsInRocmVlRFNNZXRob2RVcmwiOiJodHRwczovL21vY2stZHMuc3RnLWV1LXdlc3QzLmVwZ2ludC5jb20vcHVibGljL21ldGhvZC1kYXRhLyIsInRocmVlRFNNZXRob2REYXRhIjoiZXlKMGFISmxaVVJUVTJWeWRtVnlWSEpoYm5OSlJDSTZJalUzT1daaE56TmpMV1V4TUdZdE5HVm1PUzFpWVRreUxUQXlZVGs1WmpBeFlUQTVZeUlzSUNKMGFISmxaVVJUVFdWMGFHOWtUbTkwYVdacFkyRjBhVzl1VlZKTUlqb2dJbWgwZEhCek9pOHZZMmhsWTJ0dmRYUXVjM1JuTFdWMUxYZGxjM1F6TG1Wd1oybHVkQzVqYjIwdlJWQkhRMmhsWTJ0dmRYUXZZMkZzYkdKaFkyc3ZaMkYwYUdWeVJHVjJhV05sVG05MGFXWnBZMkYwYVc5dUwzQmhlWE52YkM4elpITjJNaTg1T0RjMU1qQWlmUT09IiwiYnJhbmQiOiJ2aXNhIiwicmVzdW1lQXV0aGVudGljYXRpb24iOiJodHRwczovL2NoZWNrb3V0LnN0Zy1ldS13ZXN0My5lcGdpbnQuY29tL0VQR0NoZWNrb3V0L3JldHVybnVybC9mcmljdGlvbmxlc3MvcGF5c29sLzNkc3YyLzk4NzUyMD90aHJlZURTdjJUb2tlbj01NzlmYTczYy1lMTBmLTRlZjktYmE5Mi0wMmE5OWYwMWEwOWMiLCJyZW5kZXJDYXNoaWVyTG9jYXRpb24iOiJodHRwczovL2VwZ2pzLXJlbmRlcmNhc2hpZXItc3RnLmVhc3lwYXltZW50Z2F0ZXdheS5jb20iLCJjaGFsbGVuZ2VXaW5kb3dzU2l6ZSI6IjA1In0=\n",
"respCode": {
"message": "Successful",
"uuid": "94230671_ecf0_4fbf_aa12_196a4f557621"
},
"service": "TRA",
"subscriptionPlan": "string"
}
],
"status": "SUCCESS",
"workFlowResponse": {
"id": "48787",
"name": "debit creditcards (TRA)",
"version": "0"
}
}
}