Create a payment
Changed onCreate and authorize a payment for a given customer order. You should provide a payment method token here to avoid PCI implications. If only a payment method token is passed, the values passed with the Client Session is used to determine the amount, currency etc. Note: `amount`, `currencyCode` and `orderId` are required during payment creation. Make sure to pass these fields when creating a client session, or if not yet available, when creating a payment. All fields provided on this request will take preference over any field on the `order` associated with the client session. E.g. if you pass `amount` on this request, it will override the `amount` on the `order` associated with the Client Session. Parameters that are not on this request will be fetched from previously created Client Session and merged. E.g. if you specify `customer.billingAddress` in Client Session and then pass `customer.emailAddress` data with this request, it will automatically merge the `customer` fields and use both `billingAddress` and `emailAddress` for later calculations.
Request
- Base URLhttps://api.sandbox.primer.io
- URLhttps://api.sandbox.primer.io/payments
- AuthAPI key in header X-API-KEY
Headers
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.
Request body
Example request
{
"orderId": "order-abc",
"currencyCode": "EUR",
"amount": 42,
"paymentMethodToken": "heNwnqaeRiqvY1UcslfQc3wxNjEzOTIxNjc4",
"customerId": "customer-123",
"customer": {
"emailAddress": "customer123@gmail.com"
},
"metadata": {
"productId": 123,
"merchantId": "a13bsd62s"
},
"paymentMethod": {
"paymentType": "SUBSCRIPTION",
"vaultOnSuccess": true,
"authorizationType": "ESTIMATED"
}
}Response
Successful Response
Example response
{
"transactions": [
{
"reason": "Item returned.",
"events": [
{
"id": "46d25279-9d36-4237-8f45-2dc4e4e262d6",
"processorEventId": "30B258847H402782C",
"date": "2025-01-22T13:39:18.992928",
"type": "CAPTURE_SUCCEEDED",
"amount": 1234
}
]
}
],
"riskData": {
"fraudChecks": {
"source": "FRAUD_PROVIDER"
},
"cvvCheck": {
"source": "PROCESSOR"
},
"avsCheck": {
"source": "PROCESSOR"
}
}
}Changes
- breaking
removed the enum value
MROof the request property - breaking
removed the enum value
XAGof the request property - breaking
removed the enum value
XAUof the request property - breaking
removed the enum value
XBAof the request property - breaking
removed the enum value
XBBof the request property - breaking
removed the enum value
XBCof the request property - breaking
removed the enum value
XBDof the request property - breaking
removed the enum value
XDRof the request property - breaking
removed the enum value
XFUof the request property - breaking
removed the enum value
XPDof the request property - breaking
removed the enum value
XPTof the request property - breaking
removed the enum value
XSUof the request property - breaking
removed the enum value
XTSof the request property - breaking
removed the enum value
XUAof the request property - breaking
added the pattern
^[A-Za-z0-9_-]+$to the request property - breaking
the response property
/became optional for the status - breaking
the response property
//////became optional for the status - breaking
the response property
//became optional for the status - breaking
the response property
///became optional for the status - warning
added the new
ADYEN_ALIPAY_PLUSenum value to the/response property for the response status - warning
added the new
ADYEN_CASHAPPenum value to the/response property for the response status - warning
added the new
ADYEN_KAKAOPAYenum value to the/response property for the response status - warning
added the new
ADYEN_PAYPAYenum value to the/response property for the response status - warning
added the new
AIRWALLEX_BANK_TRANSFERenum value to the/response property for the response status - warning
added the new
AIRWALLEX_BLIKenum value to the/response property for the response status - warning
added the new
AIRWALLEX_CASHAPPenum value to the/response property for the response status - warning
added the new
AIRWALLEX_DANAenum value to the/response property for the response status - warning
added the new
AIRWALLEX_GCASHenum value to the/response property for the response status - warning
added the new
AIRWALLEX_GRABPAYenum value to the/response property for the response status - warning
added the new
AIRWALLEX_IDEALenum value to the/response property for the response status - warning
added the new
AIRWALLEX_KAKAOPAYenum value to the/response property for the response status - warning
added the new
AIRWALLEX_KLARNAenum value to the/response property for the response status - warning
added the new
AIRWALLEX_OCTOPUSenum value to the/response property for the response status - warning
added the new
AIRWALLEX_P24enum value to the/response property for the response status - warning
added the new
AIRWALLEX_PAYSAFECARDenum value to the/response property for the response status - warning
added the new
AIRWALLEX_PAYSAFECASHenum value to the/response property for the response status - warning
added the new
AIRWALLEX_PROMPTPAYenum value to the/response property for the response status - warning
added the new
AIRWALLEX_SEPAenum value to the/response property for the response status - warning
added the new
AIRWALLEX_SKRILLenum value to the/response property for the response status - warning
added the new
AIRWALLEX_TABBYenum value to the/response property for the response status - warning
added the new
AIRWALLEX_TWINTenum value to the/response property for the response status - warning
added the new
AIRWALLEX_WECHATenum value to the/response property for the response status - warning
added the new
AIRWALLEX_WEROenum value to the/response property for the response status - warning
added the new
ALMAenum value to the/response property for the response status - warning
added the new
CETELEM_BNPP_FINANCINGenum value to the/response property for the response status - warning
added the new
CHECKOUT_ACHenum value to the/response property for the response status - warning
added the new
CHECKOUT_ALIPAY_CNenum value to the/response property for the response status - warning
added the new
CHECKOUT_ALIPAY_HKenum value to the/response property for the response status - warning
added the new
CHECKOUT_ALMAenum value to the/response property for the response status - warning
added the new
CHECKOUT_BANCONTACTenum value to the/response property for the response status - warning
added the new
CHECKOUT_BENEFITenum value to the/response property for the response status - warning
added the new
CHECKOUT_BIZUMenum value to the/response property for the response status - warning
added the new
CHECKOUT_DANAenum value to the/response property for the response status - warning
added the new
CHECKOUT_EPSenum value to the/response property for the response status - warning
added the new
CHECKOUT_GCASHenum value to the/response property for the response status - warning
added the new
CHECKOUT_IDEALenum value to the/response property for the response status - warning
added the new
CHECKOUT_KAKAOPAYenum value to the/response property for the response status - warning
added the new
CHECKOUT_KLARNAenum value to the/response property for the response status - warning
added the new
CHECKOUT_KNETenum value to the/response property for the response status - warning
added the new
CHECKOUT_MBWAYenum value to the/response property for the response status - warning
added the new
CHECKOUT_MOBILEPAYenum value to the/response property for the response status - warning
added the new
CHECKOUT_MULTIBANCOenum value to the/response property for the response status - warning
added the new
CHECKOUT_OCTOPUSenum value to the/response property for the response status - warning
added the new
CHECKOUT_OMANNETenum value to the/response property for the response status - warning
added the new
CHECKOUT_P24enum value to the/response property for the response status - warning
added the new
CHECKOUT_PAYNOWenum value to the/response property for the response status - warning
added the new
CHECKOUT_PAYPALenum value to the/response property for the response status - warning
added the new
CHECKOUT_PINLESS_DEBITenum value to the/response property for the response status - warning
added the new
CHECKOUT_QPAYenum value to the/response property for the response status - warning
added the new
CHECKOUT_SEPAenum value to the/response property for the response status - warning
added the new
CHECKOUT_SEQURAenum value to the/response property for the response status - warning
added the new
CHECKOUT_STC_PAYenum value to the/response property for the response status - warning
added the new
CHECKOUT_SWISHenum value to the/response property for the response status - warning
added the new
CHECKOUT_TABBYenum value to the/response property for the response status - warning
added the new
CHECKOUT_TAMARAenum value to the/response property for the response status - warning
added the new
CHECKOUT_TNGenum value to the/response property for the response status - warning
added the new
CHECKOUT_TRUEMONEYenum value to the/response property for the response status - warning
added the new
CHECKOUT_TWINTenum value to the/response property for the response status - warning
added the new
CHECKOUT_VENMOenum value to the/response property for the response status - warning
added the new
CHECKOUT_VIPPSenum value to the/response property for the response status - warning
added the new
CHECKOUT_WECHATenum value to the/response property for the response status - warning
added the new
DLOCAL_BANK_TRANSFERenum value to the/response property for the response status - warning
added the new
DLOCAL_BOLETOenum value to the/response property for the response status - warning
added the new
DLOCAL_KUESKIenum value to the/response property for the response status - warning
added the new
DLOCAL_MERCADO_PAGOenum value to the/response property for the response status - warning
added the new
DLOCAL_MOBICREDenum value to the/response property for the response status - warning
added the new
DLOCAL_NUPAYenum value to the/response property for the response status - warning
added the new
DLOCAL_OXXOenum value to the/response property for the response status - warning
added the new
DLOCAL_PICPAYenum value to the/response property for the response status - warning
added the new
DLOCAL_PIXenum value to the/response property for the response status - warning
added the new
DLOCAL_PIX_AUTOMATICOenum value to the/response property for the response status - warning
added the new
DLOCAL_SPEIenum value to the/response property for the response status - warning
added the new
DLOCAL_TAMARAenum value to the/response property for the response status - warning
added the new
DLOCAL_WECHATenum value to the/response property for the response status - warning
added the new
EFTPOSenum value to the////response property for the response status - warning
added the new
FINTECTURE_IMMEDIATE_TRANSFERenum value to the/response property for the response status - warning
added the new
FINTECTURE_SMART_TRANSFERenum value to the/response property for the response status - warning
added the new
FLOA_PAYenum value to the/response property for the response status - warning
added the new
HITPAYenum value to the/response property for the response status - warning
added the new
HITPAY_ATOMEenum value to the/response property for the response status - warning
added the new
HITPAY_GRABPAYenum value to the/response property for the response status - warning
added the new
HITPAY_SHOPEEPAYenum value to the/response property for the response status - warning
added the new
HITPAY_WECHATenum value to the/response property for the response status - warning
added the new
LOW_TRANSACTION_VALUEenum value to the//response property for the response status - warning
added the new
NOMUPAY_ALIPAYenum value to the/response property for the response status - warning
added the new
NOMUPAY_ALIPAY_PLUSenum value to the/response property for the response status - warning
added the new
NOMUPAY_BLIKenum value to the/response property for the response status - warning
added the new
NOMUPAY_GCASHenum value to the/response property for the response status - warning
added the new
NOMUPAY_GRABPAYenum value to the/response property for the response status - warning
added the new
NOMUPAY_P24enum value to the/response property for the response status - warning
added the new
NOMUPAY_SHOPEEPAYenum value to the/response property for the response status - warning
added the new
NOMUPAY_SWISHenum value to the/response property for the response status - warning
added the new
NOMUPAY_TRUSTLYenum value to the/response property for the response status - warning
added the new
NOMUPAY_TWINTenum value to the/response property for the response status - warning
added the new
NOMUPAY_WECHATenum value to the/response property for the response status - warning
added the new
NOMUPAY_WEROenum value to the/response property for the response status - warning
added the new
NUVEI_ALIPAYenum value to the/response property for the response status - warning
added the new
NUVEI_BANCOMATenum value to the/response property for the response status - warning
added the new
NUVEI_BANK_TRANSFERenum value to the/response property for the response status - warning
added the new
NUVEI_BIZUMenum value to the/response property for the response status - warning
added the new
NUVEI_BLIKenum value to the/response property for the response status - warning
added the new
NUVEI_CASHAPPenum value to the/response property for the response status - warning
added the new
NUVEI_DANAenum value to the/response property for the response status - warning
added the new
NUVEI_EPSenum value to the/response property for the response status - warning
added the new
NUVEI_GCASHenum value to the/response property for the response status - warning
added the new
NUVEI_GRABPAYenum value to the/response property for the response status - warning
added the new
NUVEI_IDEALenum value to the/response property for the response status - warning
added the new
NUVEI_KAKAOPAYenum value to the/response property for the response status - warning
added the new
NUVEI_KLARNAenum value to the/response property for the response status - warning
added the new
NUVEI_MBWAYenum value to the/response property for the response status - warning
added the new
NUVEI_MERCADO_PAGOenum value to the/response property for the response status - warning
added the new
NUVEI_MOBILEPAYenum value to the/response property for the response status - warning
added the new
NUVEI_MULTIBANCOenum value to the/response property for the response status - warning
added the new
NUVEI_MYBANKenum value to the/response property for the response status - warning
added the new
NUVEI_NPPenum value to the/response property for the response status - warning
added the new
NUVEI_OXXOenum value to the/response property for the response status - warning
added the new
NUVEI_P24enum value to the/response property for the response status - warning
added the new
NUVEI_PAYNOWenum value to the/response property for the response status - warning
added the new
NUVEI_PAYSAFECARDenum value to the/response property for the response status - warning
added the new
NUVEI_PICPAYenum value to the/response property for the response status - warning
added the new
NUVEI_PROMPTPAYenum value to the/response property for the response status - warning
added the new
NUVEI_RIVERTYenum value to the/response property for the response status - warning
added the new
NUVEI_SHOPEEPAYenum value to the/response property for the response status - warning
added the new
NUVEI_SKRILLenum value to the/response property for the response status - warning
added the new
NUVEI_SWISHenum value to the/response property for the response status - warning
added the new
NUVEI_TRUSTLYenum value to the/response property for the response status - warning
added the new
NUVEI_TWINTenum value to the/response property for the response status - warning
added the new
NUVEI_VENMOenum value to the/response property for the response status - warning
added the new
NUVEI_WECHATenum value to the/response property for the response status - warning
added the new
ONEPOINT6_AMEXenum value to the/response property for the response status - warning
added the new
ONEPOINT6_ANCVenum value to the/response property for the response status - warning
added the new
ONEPOINT6_BANCOMATenum value to the/response property for the response status - warning
added the new
ONEPOINT6_BANCONTACTenum value to the/response property for the response status - warning
added the new
ONEPOINT6_CUPenum value to the/response property for the response status - warning
added the new
ONEPOINT6_FLOA_PAYenum value to the/response property for the response status - warning
added the new
ONEPOINT6_IDEALenum value to the/response property for the response status - warning
added the new
ONEPOINT6_JCBenum value to the/response property for the response status - warning
added the new
ONEPOINT6_KLARNAenum value to the/response property for the response status - warning
added the new
ONEPOINT6_MULTIBANCOenum value to the/response property for the response status - warning
added the new
ONEPOINT6_PAYPALenum value to the/response property for the response status - warning
added the new
ONEPOINT6_SCTenum value to the/response property for the response status - warning
added the new
ONEPOINT6_SDDenum value to the/response property for the response status - warning
added the new
ONEPOINT6_SWISHenum value to the/response property for the response status - warning
added the new
ONEPOINT6_WECHATenum value to the/response property for the response status - warning
added the new
ONEPOINT6_WEROenum value to the/response property for the response status - warning
added the new
PAYABL_BANCONTACTenum value to the/response property for the response status - warning
added the new
PAYABL_BLIKenum value to the/response property for the response status - warning
added the new
PAYABL_BOLETOenum value to the/response property for the response status - warning
added the new
PAYABL_IDEALenum value to the/response property for the response status - warning
added the new
PAYABL_MULTIBANCOenum value to the/response property for the response status - warning
added the new
PAYABL_OXXOenum value to the/response property for the response status - warning
added the new
PAYABL_P24enum value to the/response property for the response status - warning
added the new
PAYABL_PAYSAFECARDenum value to the/response property for the response status - warning
added the new
PAYABL_PIXenum value to the/response property for the response status - warning
added the new
PAYABL_SEPAenum value to the/response property for the response status - warning
added the new
PAYABL_SPEIenum value to the/response property for the response status - warning
added the new
PAYABL_TRUSTLYenum value to the/response property for the response status - warning
added the new
PAYABL_TWINTenum value to the/response property for the response status - warning
added the new
PAYABL_WEROenum value to the/response property for the response status - warning
added the new
PAYSAFE_BANK_TRANSFERenum value to the/response property for the response status - warning
added the new
PAYSAFE_NETELLERenum value to the/response property for the response status - warning
added the new
PAYSAFE_PAYSAFECARDenum value to the/response property for the response status - warning
added the new
PAYSAFE_PAYSAFECASHenum value to the/response property for the response status - warning
added the new
PAYSAFE_SKRILLenum value to the/response property for the response status - warning
added the new
PAYSAFE_VENMOenum value to the/response property for the response status - warning
added the new
PAY_NL_RIVERTYenum value to the/response property for the response status - warning
added the new
PRIMER_TEST_APPLE_PAYenum value to the/response property for the response status - warning
added the new
PRIMER_TEST_GOOGLE_PAYenum value to the/response property for the response status - warning
added the new
PRIMER_TEST_KLARNAenum value to the/response property for the response status - warning
added the new
PRIMER_TEST_PAYPALenum value to the/response property for the response status - warning
added the new
PRIMER_TEST_SOFORTenum value to the/response property for the response status - warning
added the new
REVIEWenum value to the//response property for the response status - warning
added the new
REVIEWenum value to the//response property for the response status - warning
added the new
REVOLUT_PAYenum value to the/response property for the response status - warning
added the new
REVOLUT_PAY_BY_BANKenum value to the/response property for the response status - warning
added the new
SCALAPAYenum value to the/response property for the response status - warning
added the new
SLEenum value to theresponse property for the response status - warning
added the new
SLEenum value to the////response property for the response status - warning
added the new
SLEenum value to the//response property for the response status - warning
added the new
STNenum value to theresponse property for the response status - warning
added the new
STNenum value to the////response property for the response status - warning
added the new
STNenum value to the//response property for the response status - warning
added the new
STRIPE_ACHenum value to the/response property for the response status - warning
added the new
STRIPE_ALIPAYenum value to the/response property for the response status - warning
added the new
STRIPE_CASHAPPenum value to the/response property for the response status - warning
added the new
STRIPE_GRABPAYenum value to the/response property for the response status - warning
added the new
STRIPE_KAKAOPAYenum value to the/response property for the response status - warning
added the new
STRIPE_KLARNAenum value to the/response property for the response status - warning
added the new
STRIPE_PIXenum value to the/response property for the response status - warning
added the new
STRIPE_SEPAenum value to the/response property for the response status - warning
added the new
STRIPE_WECHATenum value to the/response property for the response status - warning
added the new
THREE_DS_EXEMPTIONenum value to the//response property for the response status - warning
added the new
VEDenum value to theresponse property for the response status - warning
added the new
VEDenum value to the////response property for the response status - warning
added the new
VEDenum value to the//response property for the response status - warning
added the new
VESenum value to theresponse property for the response status - warning
added the new
VESenum value to the////response property for the response status - warning
added the new
VESenum value to the//response property for the response status - warning
added the new
XCGenum value to theresponse property for the response status - warning
added the new
XCGenum value to the////response property for the response status - warning
added the new
XCGenum value to the//response property for the response status - warning
added the new
ZWGenum value to theresponse property for the response status - warning
added the new
ZWGenum value to the////response property for the response status - warning
added the new
ZWGenum value to the//response property for the response status - info
added the new
SLEenum value to the request property - info
added the new
STNenum value to the request property - info
added the new
VEDenum value to the request property - info
added the new
VESenum value to the request property - info
added the new
XCGenum value to the request property - info
added the new
ZWGenum value to the request property - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
removed the
MROenum value from theresponse property for the response status - info
removed the
MROenum value from the////response property for the response status - info
removed the
MROenum value from the//response property for the response status - info
removed the
XAGenum value from theresponse property for the response status - info
removed the
XAGenum value from the////response property for the response status - info
removed the
XAGenum value from the//response property for the response status - info
removed the
XAUenum value from theresponse property for the response status - info
removed the
XAUenum value from the////response property for the response status - info
removed the
XAUenum value from the//response property for the response status - info
removed the
XBAenum value from theresponse property for the response status - info
removed the
XBAenum value from the////response property for the response status - info
removed the
XBAenum value from the//response property for the response status - info
removed the
XBBenum value from theresponse property for the response status - info
removed the
XBBenum value from the////response property for the response status - info
removed the
XBBenum value from the//response property for the response status - info
removed the
XBCenum value from theresponse property for the response status - info
removed the
XBCenum value from the////response property for the response status - info
removed the
XBCenum value from the//response property for the response status - info
removed the
XBDenum value from theresponse property for the response status - info
removed the
XBDenum value from the////response property for the response status - info
removed the
XBDenum value from the//response property for the response status - info
removed the
XDRenum value from theresponse property for the response status - info
removed the
XDRenum value from the////response property for the response status - info
removed the
XDRenum value from the//response property for the response status - info
removed the
XFUenum value from theresponse property for the response status - info
removed the
XFUenum value from the////response property for the response status - info
removed the
XFUenum value from the//response property for the response status - info
removed the
XPDenum value from theresponse property for the response status - info
removed the
XPDenum value from the////response property for the response status - info
removed the
XPDenum value from the//response property for the response status - info
removed the
XPTenum value from theresponse property for the response status - info
removed the
XPTenum value from the////response property for the response status - info
removed the
XPTenum value from the//response property for the response status - info
removed the
XSUenum value from theresponse property for the response status - info
removed the
XSUenum value from the////response property for the response status - info
removed the
XSUenum value from the//response property for the response status - info
removed the
XTSenum value from theresponse property for the response status - info
removed the
XTSenum value from the////response property for the response status - info
removed the
XTSenum value from the//response property for the response status - info
removed the
XUAenum value from theresponse property for the response status - info
removed the
XUAenum value from the////response property for the response status - info
removed the
XUAenum value from the//response property for the response status
- breaking
- info
added the optional property
///to the response with the status
- info