curl --request POST \
--url https://api.sandbox.primer.io/payments/{id}/cancel \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-API-VERSION: <x-api-version>' \
--data '
{
"reason": "Customer cancelled order #1234."
}
'{
"id": "kHdEw9EG",
"date": "2021-02-21T15:36:16.367687",
"dateUpdated": "2021-02-21T15:36:17.133701",
"status": "CANCELLED",
"orderId": "order-abc",
"customerId": "customer-123",
"currencyCode": "EUR",
"amount": 42,
"cardTokenType": "CARD_PAN",
"paymentMethod": {
"paymentType": "SUBSCRIPTION",
"paymentMethodToken": "heNwnqaeRiqvY1UcslfQc3wxNjEzOTIxNjc4",
"isVaulted": true,
"authorizationType": "FINAL",
"descriptor": "Purchase: Socks",
"analyticsId": "VtkMDAxZW5isH0HsbbNxZ3lo",
"paymentMethodType": "PAYMENT_CARD",
"paymentMethodData": {
"first6Digits": "411111",
"last4Digits": "1111",
"expirationMonth": "12",
"expirationYear": "2030",
"cardholderName": "John Biggins",
"network": "Visa",
"isNetworkTokenized": false,
"binData": {
"network": "VISA",
"regionalRestriction": "UNKNOWN",
"accountNumberType": "UNKNOWN",
"accountFundingType": "UNKNOWN",
"prepaidReloadableIndicator": "NOT_APPLICABLE",
"productUsageType": "UNKNOWN",
"productCode": "VISA",
"productName": "VISA"
}
}
},
"processor": {
"name": "STRIPE",
"processorMerchantId": "acct_stripe_1234",
"amountCaptured": 0,
"amountRefunded": 0
},
"transactions": [
{
"type": "SALE",
"processorStatus": "CANCELLED",
"processorName": "STRIPE",
"processorMerchantId": "acct_stripe_1234",
"processorTransactionId": "54c4eb5b3ef8a",
"cardTokenType": "CARD_PAN",
"reason": "Customer returned order #1234."
}
],
"customer": {
"email": "customer123@gmail.com"
},
"metadata": {
"productId": 123,
"merchantId": "a13bsd62s"
},
"riskData": {
"fraudChecks": {
"source": "FRAUD_PROVIDER",
"preAuthorizationResult": "THREE_DS",
"postAuthorizationResult": "ACCEPT"
},
"cvvCheck": {
"source": "PROCESSOR",
"result": "MATCHED"
},
"avsCheck": {
"source": "PROCESSOR",
"result": {
"streetAddress": "NOT_MATCHED",
"postalCode": "NOT_VERIFIED"
}
}
}
}Provided the payment has not reached SETTLED status, Primer will
send a “void” request to the payment processor, thereby cancelling the payment
and releasing the hold on customer funds. Upon success, the payment will transition
to CANCELLED. The payload is optional.
curl --request POST \
--url https://api.sandbox.primer.io/payments/{id}/cancel \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-API-VERSION: <x-api-version>' \
--data '
{
"reason": "Customer cancelled order #1234."
}
'{
"id": "kHdEw9EG",
"date": "2021-02-21T15:36:16.367687",
"dateUpdated": "2021-02-21T15:36:17.133701",
"status": "CANCELLED",
"orderId": "order-abc",
"customerId": "customer-123",
"currencyCode": "EUR",
"amount": 42,
"cardTokenType": "CARD_PAN",
"paymentMethod": {
"paymentType": "SUBSCRIPTION",
"paymentMethodToken": "heNwnqaeRiqvY1UcslfQc3wxNjEzOTIxNjc4",
"isVaulted": true,
"authorizationType": "FINAL",
"descriptor": "Purchase: Socks",
"analyticsId": "VtkMDAxZW5isH0HsbbNxZ3lo",
"paymentMethodType": "PAYMENT_CARD",
"paymentMethodData": {
"first6Digits": "411111",
"last4Digits": "1111",
"expirationMonth": "12",
"expirationYear": "2030",
"cardholderName": "John Biggins",
"network": "Visa",
"isNetworkTokenized": false,
"binData": {
"network": "VISA",
"regionalRestriction": "UNKNOWN",
"accountNumberType": "UNKNOWN",
"accountFundingType": "UNKNOWN",
"prepaidReloadableIndicator": "NOT_APPLICABLE",
"productUsageType": "UNKNOWN",
"productCode": "VISA",
"productName": "VISA"
}
}
},
"processor": {
"name": "STRIPE",
"processorMerchantId": "acct_stripe_1234",
"amountCaptured": 0,
"amountRefunded": 0
},
"transactions": [
{
"type": "SALE",
"processorStatus": "CANCELLED",
"processorName": "STRIPE",
"processorMerchantId": "acct_stripe_1234",
"processorTransactionId": "54c4eb5b3ef8a",
"cardTokenType": "CARD_PAN",
"reason": "Customer returned order #1234."
}
],
"customer": {
"email": "customer123@gmail.com"
},
"metadata": {
"productId": 123,
"merchantId": "a13bsd62s"
},
"riskData": {
"fraudChecks": {
"source": "FRAUD_PROVIDER",
"preAuthorizationResult": "THREE_DS",
"postAuthorizationResult": "ACCEPT"
},
"cvvCheck": {
"source": "PROCESSOR",
"result": "MATCHED"
},
"avsCheck": {
"source": "PROCESSOR",
"result": {
"streetAddress": "NOT_MATCHED",
"postalCode": "NOT_VERIFIED"
}
}
}
}Optional key to make the request idempotent. Enables a safe retry of a request without risking the user being charged or refunded multiple times. The idempotency key must be generated by the client and needs to be unique for every new request.
Specifies the version of the API to use. This must be set to 2.4.
"2.4"
ID of payment to cancel.
Successful Response
The unique payment ID.
You can use this ID to retrieve the payment details, or perform downstream operations.
The date and time at which the payment was created in UTC format.
The date and time of the last payment update in UTC format.
See the payment status table for more information.
PENDING, FAILED, AUTHORIZED, SETTLING, PARTIALLY_SETTLED, SETTLED, DECLINED, CANCELLED The type of card token used for the payment.
Only applies for card payments.
CARD_PAN, NETWORK_TOKEN, PROCESSOR_TOKEN "CARD_PAN"
Your reference for the payment.
256The 3-letter currency code in ISO 4217 format. e.g. use USD for US dollars.
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYR, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MXV, 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, SOS, SRD, SSP, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XFU, XOF, XPD, XPF, XPT, XSU, XTS, XUA, YER, ZAR, ZMW, ZWL The amount you charged the customer, in minor units.
x >= 0More information associated with the order.
Show child attributes
The details of the line items of the order.
Show child attributes
The amount charged to the customer, in minor units. The minimum amount is 0. The maximum amount is the limit of int64.
x >= 0A unique identifier for the line item.
1 - 256A name of the item.
256A description of the item.
256The number of the particular line item that is being ordered.
Any discount applicable to this item, in minor units. This discount is applied for the entire line item, and not per quantity.
x >= 0The tax charged on this item, in minor units. This tax amount is applied for the entire line item, and not per quantity.
x >= 0The tax code associated with this item, in minor units. This is required for Primer-initiated tax calculations.
1 - 256An identifier for the product type.
PHYSICAL, DIGITAL Details related to the product
Show child attributes
The product SKU
1 - 256The product brand
1 - 256The product color
1 - 256The product Global Trade Item Number (e.g. ISBN)
1 - 256The product Manufacturer Part Number
1 - 256The product weight
x >= 0The product weight unit (e.g. kg, g)
1 - 256The product page URL
1 - 1024The country in which the order is created
AW, AF, AO, AI, AX, AL, AD, AE, AR, AM, AS, AQ, TF, AG, AU, AT, AZ, BI, BE, BJ, BQ, BF, BD, BG, BH, BS, BA, BL, BY, BZ, BM, BO, BR, BB, BN, BT, BV, BW, CF, CA, CC, CH, CL, CN, CI, CM, CD, CG, CK, CO, KM, CV, CR, CU, CW, CX, KY, CY, CZ, DE, DJ, DM, DK, DO, DZ, EC, EG, ER, EH, ES, EE, ET, FI, FJ, FK, FR, FO, FM, GA, GB, GE, GG, GH, GI, GN, GP, GM, GW, GQ, GR, GD, GL, GT, GF, GU, GY, HK, HM, HN, HR, HT, HU, ID, IM, IN, IO, IE, IR, IQ, IS, IL, IT, JM, JE, JO, JP, KZ, KE, KG, KH, KI, KN, KR, KW, LA, LB, LR, LY, LC, LI, LK, LS, LT, LU, LV, MO, MF, MA, MC, MD, MG, MV, MX, MH, MK, ML, MT, MM, ME, MN, MP, MZ, MR, MS, MQ, MU, MW, MY, YT, NA, NC, NE, NF, NG, NI, NU, NL, NO, NP, NR, NZ, OM, PK, PA, PN, PE, PH, PW, PG, PL, PR, KP, PT, PY, PS, PF, QA, RE, RO, RU, RW, SA, SD, SN, SG, GS, SH, SJ, SB, SL, SV, SM, SO, PM, RS, SS, ST, SR, SK, SI, SE, SZ, SX, SC, SY, TC, TD, TG, TH, TJ, TK, TM, TL, TO, TT, TN, TR, TV, TW, TZ, UG, UA, UM, UY, US, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, ZA, ZM, ZW The country code of the retailer
AW, AF, AO, AI, AX, AL, AD, AE, AR, AM, AS, AQ, TF, AG, AU, AT, AZ, BI, BE, BJ, BQ, BF, BD, BG, BH, BS, BA, BL, BY, BZ, BM, BO, BR, BB, BN, BT, BV, BW, CF, CA, CC, CH, CL, CN, CI, CM, CD, CG, CK, CO, KM, CV, CR, CU, CW, CX, KY, CY, CZ, DE, DJ, DM, DK, DO, DZ, EC, EG, ER, EH, ES, EE, ET, FI, FJ, FK, FR, FO, FM, GA, GB, GE, GG, GH, GI, GN, GP, GM, GW, GQ, GR, GD, GL, GT, GF, GU, GY, HK, HM, HN, HR, HT, HU, ID, IM, IN, IO, IE, IR, IQ, IS, IL, IT, JM, JE, JO, JP, KZ, KE, KG, KH, KI, KN, KR, KW, LA, LB, LR, LY, LC, LI, LK, LS, LT, LU, LV, MO, MF, MA, MC, MD, MG, MV, MX, MH, MK, ML, MT, MM, ME, MN, MP, MZ, MR, MS, MQ, MU, MW, MY, YT, NA, NC, NE, NF, NG, NI, NU, NL, NO, NP, NR, NZ, OM, PK, PA, PN, PE, PH, PW, PG, PL, PR, KP, PT, PY, PS, PF, QA, RE, RO, RU, RW, SA, SD, SN, SG, GS, SH, SJ, SB, SL, SV, SM, SO, PM, RS, SS, ST, SR, SK, SI, SE, SZ, SX, SC, SY, TC, TD, TG, TH, TJ, TK, TM, TL, TO, TT, TN, TR, TV, TW, TZ, UG, UA, UM, UY, US, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, ZA, ZM, ZW The details of fees charged.
Show child attributes
The fee amount charged to the customer, in minor units. e.g. for $7, use 700.
x >= 0The type of fee.
1 - 256A description of the fee, e.g. "Currency Conversion Fee".
1 - 256The details of shipping charged.
Show child attributes
The shipping amount charged to the customer, in minor units. e.g. for $7, use 700.
x >= 0Your unique identifier of the shipping method selected by the customer.
The display label for the selected shipping method (e.g. "Standard Shipping").
The descriptive text that is displayed alongside the shipping method name.
The unique identifier for your customer.
256More information associated with the customer.
Show child attributes
Customer email address.
Note: It is recommended to include this field if a 3DS check will be performed
The customer's mobile number
256The customer's first name
256The customer's last name
256Customer billing address.
Note: It is recommended to include this field if a 3DS check will be performed
Show child attributes
1 - 2561 - 256Street name, Company name or PO Box
1 - 256Apartment, Unit or Building number
256Name of the city, district, town or village
1 - 256State, County or Province
1 - 256Two letter ISO country code
AW, AF, AO, AI, AX, AL, AD, AE, AR, AM, AS, AQ, TF, AG, AU, AT, AZ, BI, BE, BJ, BQ, BF, BD, BG, BH, BS, BA, BL, BY, BZ, BM, BO, BR, BB, BN, BT, BV, BW, CF, CA, CC, CH, CL, CN, CI, CM, CD, CG, CK, CO, KM, CV, CR, CU, CW, CX, KY, CY, CZ, DE, DJ, DM, DK, DO, DZ, EC, EG, ER, EH, ES, EE, ET, FI, FJ, FK, FR, FO, FM, GA, GB, GE, GG, GH, GI, GN, GP, GM, GW, GQ, GR, GD, GL, GT, GF, GU, GY, HK, HM, HN, HR, HT, HU, ID, IM, IN, IO, IE, IR, IQ, IS, IL, IT, JM, JE, JO, JP, KZ, KE, KG, KH, KI, KN, KR, KW, LA, LB, LR, LY, LC, LI, LK, LS, LT, LU, LV, MO, MF, MA, MC, MD, MG, MV, MX, MH, MK, ML, MT, MM, ME, MN, MP, MZ, MR, MS, MQ, MU, MW, MY, YT, NA, NC, NE, NF, NG, NI, NU, NL, NO, NP, NR, NZ, OM, PK, PA, PN, PE, PH, PW, PG, PL, PR, KP, PT, PY, PS, PF, QA, RE, RO, RU, RW, SA, SD, SN, SG, GS, SH, SJ, SB, SL, SV, SM, SO, PM, RS, SS, ST, SR, SK, SI, SE, SZ, SX, SC, SY, TC, TD, TG, TH, TJ, TK, TM, TL, TO, TT, TN, TR, TV, TW, TZ, UG, UA, UM, UY, US, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, ZA, ZM, ZW Postal or ZIP code
1 - 256Customer shipping address
Show child attributes
1 - 2561 - 256Street name, Company name or PO Box
1 - 256Apartment, Unit or Building number
256Name of the city, district, town or village
1 - 256State, County or Province
1 - 256Two letter ISO country code
AW, AF, AO, AI, AX, AL, AD, AE, AR, AM, AS, AQ, TF, AG, AU, AT, AZ, BI, BE, BJ, BQ, BF, BD, BG, BH, BS, BA, BL, BY, BZ, BM, BO, BR, BB, BN, BT, BV, BW, CF, CA, CC, CH, CL, CN, CI, CM, CD, CG, CK, CO, KM, CV, CR, CU, CW, CX, KY, CY, CZ, DE, DJ, DM, DK, DO, DZ, EC, EG, ER, EH, ES, EE, ET, FI, FJ, FK, FR, FO, FM, GA, GB, GE, GG, GH, GI, GN, GP, GM, GW, GQ, GR, GD, GL, GT, GF, GU, GY, HK, HM, HN, HR, HT, HU, ID, IM, IN, IO, IE, IR, IQ, IS, IL, IT, JM, JE, JO, JP, KZ, KE, KG, KH, KI, KN, KR, KW, LA, LB, LR, LY, LC, LI, LK, LS, LT, LU, LV, MO, MF, MA, MC, MD, MG, MV, MX, MH, MK, ML, MT, MM, ME, MN, MP, MZ, MR, MS, MQ, MU, MW, MY, YT, NA, NC, NE, NF, NG, NI, NU, NL, NO, NP, NR, NZ, OM, PK, PA, PN, PE, PH, PW, PG, PL, PR, KP, PT, PY, PS, PF, QA, RE, RO, RU, RW, SA, SD, SN, SG, GS, SH, SJ, SB, SL, SV, SM, SO, PM, RS, SS, ST, SR, SK, SI, SE, SZ, SX, SC, SY, TC, TD, TG, TH, TJ, TK, TM, TL, TO, TT, TN, TR, TV, TW, TZ, UG, UA, UM, UY, US, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, ZA, ZM, ZW Postal or ZIP code
1 - 256The customer's tax id number for tax exemptions
256The customer's national identification number
256Additional data to be used throughout the payment lifecycle.
The payment method options provided in the request, as well as the token used to process the payment.
Show child attributes
The description of the payment, as it would typically appear on a bank statement.
256Payment types, primarily to be used for recurring payments. See the table below for all possible values.
Note: if no field is set, we will return a blank value and make a best effort to calculate the downstream fields required for processing the payment.
| paymentType | Use case |
|---|---|
FIRST_PAYMENT | a customer-initiated payment which is the first in a series of recurring payments or subscription, or a card on file scenario. |
ECOMMERCE | a customer-initiated payment using stored payment details where the cardholder is present. |
SUBSCRIPTION | a merchant-initiated payment as part of a series of payments on a fixed schedule and a set amount. |
UNSCHEDULED | a merchant-initiated payment using stored payment details with no fixed schedule or amount. |
FIRST_PAYMENT, ECOMMERCE, SUBSCRIPTION, UNSCHEDULED The payment method token used to authorize the transaction.
Whether the payment method token represents a vaulted payment method and can be used for future payments.
Unique analytics identifier corresponding to a payment method
256Payment method type used for payment authorization.
PAYMENT_CARD, GOOGLE_PAY, APPLE_PAY, PAYPAL, BANK_ACCOUNT, KLARNA, APAYA, OPENNODE, HOOLAH, ATOME, COINBASE, NETS, TWOC2P, CLEARPAY, SHOPEEPAY, TRIPLE_A, AFTERPAY, NOL_PAY, PAY_NL_IDEAL, PAY_NL_BANCONTACT, PAY_NL_DIRECT_DEBIT, PAY_NL_SOFORT_BANKING, PAY_NL_PAYPAL, PAY_NL_PAYCONIQ, PAY_NL_GIROPAY, PAY_NL_P24, PAY_NL_EPS, PAY_NL_KAARTDIRECT, ADYEN_SOFORT, ADYEN_TWINT, ADYEN_GIROPAY, ADYEN_TRUSTLY, ADYEN_ALIPAY, ADYEN_MOBILEPAY, ADYEN_MULTIBANCO, ADYEN_VIPPS, ADYEN_DOTPAY, ADYEN_IDEAL, ADYEN_BLIK, ADYEN_PAYTRAIL, ADYEN_INTERAC, ADYEN_PAYSHOP, ADYEN_MBWAY, ADYEN_AFFIRM, ADYEN_KLARNA, ADYEN_BANCONTACT_PAYCONIQ, ADYEN_EPS, ADYEN_BANCONTACT_CARD, ADYEN_SWISH, MOLLIE_IDEAL, MOLLIE_BANCONTACT, MOLLIE_P24, MOLLIE_GIROPAY, MOLLIE_EPS, MOLLIE_GIFTCARD, MOLLIE_SOFORT, NETAXEPT_PAYTRAIL, BUCKAROO_IDEAL, BUCKAROO_BANCONTACT, BUCKAROO_SOFORT, BUCKAROO_GIROPAY, BUCKAROO_EPS, RAPYD_GCASH, RAPYD_PROMPTPAY, RAPYD_GRABPAY, RAPYD_POLI, RAPYD_FAST, XFERS_PAYNOW, STRIPE_GIROPAY, STRIPE_IDEAL, ALIPAY_CN, CHAI_KAKAOPAY, CHAI_NAVER, CHAI_TOSS, XENDIT_DANA, XENDIT_OVO, XENDIT_SHOPEEPAY, XENDIT_RETAIL_OUTLETS, OMISE_PROMPTPAY, OMISE_TRUEMONEY, EBANX_PAGOFACIL, PACYPAY_WECHAT, PACYPAY_ALIPAY, PACYPAY_ALIPAY_PLUS, WORLDPAY_IDEAL, IPAY88_CARD, INGENICO_PAYPAL, VOLT_PIX, VOLT_BANK_TRANSFER, BRAINTREE_VENMO, THUNES_SPIRIT_OF_CADEAU, THUNES_ILLICADO, THUNES_CARTE_CADEAU_CONFORAMA, THUNES_CHEQUE_FIDELITE_CONFORAMA, SIPS_CPAY, SIPS_CPAYCONFORAMA, MONEXT_CETELEM, MONEXT_CPAY Payment method data
Show child attributes
4246Show child attributes
The list of available card networks.
AMEX, DANKORT, DINERS_CLUB, DISCOVER, ENROUTE, ELO, HIPER, INTERAC, JCB, MAESTRO, MASTERCARD, MIR, PRIVATE_LABEL, UNIONPAY, VISA, CARTES_BANCAIRES, OTHER An enumeration.
DOMESTIC_USE_ONLY, NONE, UNKNOWN An enumeration.
PRIMARY_ACCOUNT_NUMBER, NETWORK_TOKEN, DIGITAL_PAN, UNKNOWN An enumeration.
CREDIT, DEBIT, PREPAID, CHARGE, DEFERRED_DEBIT, UNKNOWN An enumeration.
RELOADABLE, NON_RELOADABLE, NOT_APPLICABLE, UNKNOWN An enumeration.
CONSUMER, BUSINESS, GOVERNMENT, UNKNOWN 2-letter country code in ISO 3166-1 alpha format,
e.g. FR for France and GB for the United Kingdom.
AW, AF, AO, AI, AX, AL, AD, AE, AR, AM, AS, AQ, TF, AG, AU, AT, AZ, BI, BE, BJ, BQ, BF, BD, BG, BH, BS, BA, BL, BY, BZ, BM, BO, BR, BB, BN, BT, BV, BW, CF, CA, CC, CH, CL, CN, CI, CM, CD, CG, CK, CO, KM, CV, CR, CU, CW, CX, KY, CY, CZ, DE, DJ, DM, DK, DO, DZ, EC, EG, ER, EH, ES, EE, ET, FI, FJ, FK, FR, FO, FM, GA, GB, GE, GG, GH, GI, GN, GP, GM, GW, GQ, GR, GD, GL, GT, GF, GU, GY, HK, HM, HN, HR, HT, HU, ID, IM, IN, IO, IE, IR, IQ, IS, IL, IT, JM, JE, JO, JP, KZ, KE, KG, KH, KI, KN, KR, KW, LA, LB, LR, LY, LC, LI, LK, LS, LT, LU, LV, MO, MF, MA, MC, MD, MG, MV, MX, MH, MK, ML, MT, MM, ME, MN, MP, MZ, MR, MS, MQ, MU, MW, MY, YT, NA, NC, NE, NF, NG, NI, NU, NL, NO, NP, NR, NZ, OM, PK, PA, PN, PE, PH, PW, PG, PL, PR, KP, PT, PY, PS, PF, QA, RE, RO, RU, RW, SA, SD, SN, SG, GS, SH, SJ, SB, SL, SV, SM, SO, PM, RS, SS, ST, SR, SK, SI, SE, SZ, SX, SC, SY, TC, TD, TG, TH, TJ, TK, TM, TL, TO, TT, TN, TR, TV, TW, TZ, UG, UA, UM, UY, US, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, ZA, ZM, ZW 3-letter currency code in ISO 4217 format,
e.g. USD for US dollars.
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYR, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MXV, 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, SOS, SRD, SSP, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XFU, XOF, XPD, XPF, XPT, XSU, XTS, XUA, YER, ZAR, ZMW, ZWL Show child attributes
An enumeration.
NOT_PERFORMED, SKIPPED, AUTH_SUCCESS, AUTH_FAILED, CHALLENGE, METHOD An enumeration.
GATEWAY_UNAVAILABLE, DISABLED_BY_MERCHANT, NOT_SUPPORTED_BY_ISSUER, FAILED_TO_NEGOTIATE, UNKNOWN_ACS_RESPONSE, 3DS_SERVER_ERROR, ACQUIRER_NOT_CONFIGURED, ACQUIRER_NOT_PARTICIPATING, EXEMPTION_ACCEPTED Allows to adjust the authorized amount after the authorization, if supported by payment method. FINAL - the authorized amount is final and can not be adjusted. Adjusting the amount can be only done via canceling the payment and re-authorization with new amount. ESTIMATED - the amount can be adjusted after the authorization, if supported by payment method.
ESTIMATED, FINAL More information associated with the payment processor, including the processor name.
Show child attributes
The payment processor used for this payment.
256The merchant ID registered at the payment processor used for this payment.
256If no capture was performed, this value will be set to 0.
If one or more partial captures were performed, this value will be a sum of all partial capture amounts.
x >= 0If no refund was performed, this value will be set to 0.
If one or more partial refunds were performed, this value will be a sum of all partial refund amounts.
x >= 0Required action to perform in order to resume the payment workflow. This can be requiring a 3DS check from the customer for instance.
Show child attributes
Action name
3DS_AUTHENTICATION, USE_PRIMER_SDK, PAYMENT_METHOD_VOUCHER, PROCESSOR_3DS Human description of the required action to perform.
The client token to be returned to the SDK if a required action is returned.
Check this field for more information regarding the payment's status. This is especially useful when the status is DECLINED or FAILED.
Show child attributes
The status reason type for the payment, providing more information on the error.
APPLICATION_ERROR indicates something went wrong internally within primer's system.
GATEWAY_REJECTED indicates that request was rejected on the third-party.
GATEWAY_TIMEOUT indicates the timeout limit on the third party request was exceeded.
ISSUER_DECLINED indicates a legitimate decline that is not due to a timeout.
APPLICATION_ERROR, GATEWAY_REJECTED, GATEWAY_TIMEOUT, ISSUER_DECLINED If the error is of type ISSUER_DECLINED this will be returned.
Declines of type SOFT_DECLINE may be retried,
whereas declines of type HARD_DECLINE should not be retried.
SOFT_DECLINE, HARD_DECLINE If the error is of type ISSUER_DECLINED, this will be returned.
ERROR, INVALID_CARD_NUMBER, EXPIRED_CARD, LOST_OR_STOLEN_CARD, SUSPECTED_FRAUD, UNKNOWN, DECLINED, REFER_TO_CARD_ISSUER, DO_NOT_HONOR, INSUFFICIENT_FUNDS, WITHDRAWAL_LIMIT_EXCEEDED, ISSUER_TEMPORARILY_UNAVAILABLE, AUTHENTICATION_REQUIRED In case of an error on the processor's part, we will return the message returned by the processor. This is usually a human readable error.
A list summarizing the transactions that occurred while processing the payment.
Note: a refund is a separate transaction and so will appear in this transactions list if a refund was performed.
Show child attributes
Date & time of the transaction (UTC)
Transaction amount in minor units
x >= 0The 3-letter currency code in ISO 4217 format. e.g. use USD for US dollars.
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYR, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MXV, 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, SOS, SRD, SSP, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XFU, XOF, XPD, XPF, XPT, XSU, XTS, XUA, YER, ZAR, ZMW, ZWL Processor's main account identifier.
The reference submitted on payment creation or refund.
An enumeration.
SALE, REFUND Processor's unique identifier for the transaction
An identifier of a processor.
Transaction status, please refer to the Transaction Status Codes table for more information
PENDING, FAILED, AUTHORIZED, SETTLING, PARTIALLY_SETTLED, SETTLED, DECLINED, CANCELLED If the transaction has a declined or failed status.
Only if the status is DECLINED or FAILED, otherwise null.
Show child attributes
The status reason type for the payment, providing more information on the error.
APPLICATION_ERROR indicates something went wrong internally within primer's system.
GATEWAY_REJECTED indicates that request was rejected on the third-party.
GATEWAY_TIMEOUT indicates the timeout limit on the third party request was exceeded.
ISSUER_DECLINED indicates a legitimate decline that is not due to a timeout.
APPLICATION_ERROR, GATEWAY_REJECTED, GATEWAY_TIMEOUT, ISSUER_DECLINED If the error is of type ISSUER_DECLINED this will be returned.
Declines of type SOFT_DECLINE may be retried,
whereas declines of type HARD_DECLINE should not be retried.
SOFT_DECLINE, HARD_DECLINE If the error is of type ISSUER_DECLINED, this will be returned.
ERROR, INVALID_CARD_NUMBER, EXPIRED_CARD, LOST_OR_STOLEN_CARD, SUSPECTED_FRAUD, UNKNOWN, DECLINED, REFER_TO_CARD_ISSUER, DO_NOT_HONOR, INSUFFICIENT_FUNDS, WITHDRAWAL_LIMIT_EXCEEDED, ISSUER_TEMPORARILY_UNAVAILABLE, AUTHENTICATION_REQUIRED In case of an error on the processor's part, we will return the message returned by the processor. This is usually a human readable error.
The type of card token used for the payment.
Only applies for card payments.
CARD_PAN, NETWORK_TOKEN, PROCESSOR_TOKEN "CARD_PAN"
The reason for a cancel or refund request on this transaction, if any.
"Item returned."
A list of events related to the transaction, included when the expand parameter is passed.
Show child attributes
The id of the event.
"46d25279-9d36-4237-8f45-2dc4e4e262d6"
Timestamp of when the event occurred.
"2025-01-22T13:39:18.992928"
The type of the event.
AUTHORIZATION_SUCCEEDED, AUTHORIZATION_ADJUSTMENT_SUCCEEDED, CAPTURE_SUCCEEDED, CANCELLATION_SUCCEEDED "CAPTURE_SUCCEEDED"
The ID of the event from the payment processor (e.g. PayPal).
"30B258847H402782C"
The amount associated with the event in minor units.
1234
Indicates whether the event is final. For example, in the case of a capture event this would indicate whether it was a final capture or not, but in the case of a cancellation request this field will not be present.
false
Risk data associated with this payment.
Show child attributes
Results of the pre-authorization and post-authorization fraud checks.
Show child attributes
"FRAUD_PROVIDER"
Possible pre-authorization fraud check outcomes.
ACCEPT, REFUSE, FAILED, THREE_DS, THREE_DS_EXEMPTION "THREE_DS"
Pre-authorization recommendation indicating the SCA exemption or risk assessment path taken. Only present when preAuthorizationResult is THREE_DS_EXEMPTION.
Values:
TRANSACTION_RISK_ANALYSIS: Indicates that the fraud check deemed the transaction low risk and recommends applying a Transaction Risk Analysis (TRA) exemption to bypass Strong Customer Authentication (SCA) under PSD2, reducing friction for users.TRANSACTION_RISK_ANALYSIS "TRANSACTION_RISK_ANALYSIS"
Possible post-authorization fraud check outcomes.
ACCEPT, REFUSE, FAILED, THREE_DS "ACCEPT"
Results of any external CVV check performed on this payment.
Results of any external AVS check performed on this payment.
Show child attributes
"PROCESSOR"
Show child attributes
Possible risk assessment values for CVV and AVS checks.
MATCHED, NOT_MATCHED, NOT_VERIFIED, NOT_PROVIDED, NOT_APPLICABLE, SKIPPED "NOT_MATCHED"
Possible risk assessment values for CVV and AVS checks.
MATCHED, NOT_MATCHED, NOT_VERIFIED, NOT_PROVIDED, NOT_APPLICABLE, SKIPPED "NOT_VERIFIED"