curl --request POST \
--url https://api.sandbox.primer.io/payment-status \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '{
"eventType": "<string>",
"date": "2023-11-07T05:31:56Z",
"notificationConfig": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
},
"version": "2.1",
"signedAt": "1689221338",
"payment": {
"id": "<string>",
"date": "2023-11-07T05:31:56Z",
"status": "PENDING",
"orderId": "<string>",
"currencyCode": "<string>",
"amount": 1,
"customerId": "<string>",
"metadata": {},
"paymentMethod": {
"descriptor": "<string>",
"paymentType": "FIRST_PAYMENT",
"paymentMethodToken": "<string>",
"analyticsId": "<string>",
"paymentMethodType": "<string>",
"paymentMethodData": {
"first6Digits": "<string>",
"last4Digits": "<string>",
"expirationMonth": "<string>",
"expirationYear": "<string>",
"cardholderName": "<string>",
"network": "<string>",
"isNetworkTokenized": false,
"binData": {
"network": "<string>",
"issuerCountryCode": "AW",
"issuerName": "<string>",
"issuerCurrencyCode": "AED",
"regionalRestriction": "DOMESTIC_USE_ONLY",
"accountNumberType": "PRIMARY_ACCOUNT_NUMBER",
"accountFundingType": "CREDIT",
"prepaidReloadableIndicator": "RELOADABLE",
"productUsageType": "CONSUMER",
"productCode": "<string>",
"productName": "<string>"
}
},
"threeDSecureAuthentication": {
"responseCode": "NOT_PERFORMED",
"reasonCode": "GATEWAY_UNAVAILABLE",
"reasonText": "<string>",
"protocolVersion": "<string>",
"challengeIssued": true
}
},
"processor": {
"name": "<string>",
"processorMerchantId": "<string>",
"amountCaptured": 123,
"amountRefunded": 123
},
"statusReason": {
"type": "APPLICATION_ERROR",
"declineType": "SOFT_DECLINE",
"code": "ERROR",
"message": "<string>"
},
"transactions": [
{
"date": "2023-11-07T05:31:56Z",
"amount": 1,
"currencyCode": "<string>",
"transactionType": "SALE",
"processorTransactionId": "<string>",
"processorName": "<string>",
"processorMerchantId": "<string>",
"processorStatus": "PENDING",
"processorStatusReason": {
"type": "APPLICATION_ERROR",
"declineType": "SOFT_DECLINE",
"code": "ERROR",
"message": "<string>"
}
}
]
}
}'
Primer notifies you with a PAYMENT.STATUS
webhook when a payment’s status has been updated. This is especially useful for asynchronous processor Connections, which do not respond with an upfront authorization.
The webhook body contains the full payment object.
curl --request POST \
--url https://api.sandbox.primer.io/payment-status \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '{
"eventType": "<string>",
"date": "2023-11-07T05:31:56Z",
"notificationConfig": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
},
"version": "2.1",
"signedAt": "1689221338",
"payment": {
"id": "<string>",
"date": "2023-11-07T05:31:56Z",
"status": "PENDING",
"orderId": "<string>",
"currencyCode": "<string>",
"amount": 1,
"customerId": "<string>",
"metadata": {},
"paymentMethod": {
"descriptor": "<string>",
"paymentType": "FIRST_PAYMENT",
"paymentMethodToken": "<string>",
"analyticsId": "<string>",
"paymentMethodType": "<string>",
"paymentMethodData": {
"first6Digits": "<string>",
"last4Digits": "<string>",
"expirationMonth": "<string>",
"expirationYear": "<string>",
"cardholderName": "<string>",
"network": "<string>",
"isNetworkTokenized": false,
"binData": {
"network": "<string>",
"issuerCountryCode": "AW",
"issuerName": "<string>",
"issuerCurrencyCode": "AED",
"regionalRestriction": "DOMESTIC_USE_ONLY",
"accountNumberType": "PRIMARY_ACCOUNT_NUMBER",
"accountFundingType": "CREDIT",
"prepaidReloadableIndicator": "RELOADABLE",
"productUsageType": "CONSUMER",
"productCode": "<string>",
"productName": "<string>"
}
},
"threeDSecureAuthentication": {
"responseCode": "NOT_PERFORMED",
"reasonCode": "GATEWAY_UNAVAILABLE",
"reasonText": "<string>",
"protocolVersion": "<string>",
"challengeIssued": true
}
},
"processor": {
"name": "<string>",
"processorMerchantId": "<string>",
"amountCaptured": 123,
"amountRefunded": 123
},
"statusReason": {
"type": "APPLICATION_ERROR",
"declineType": "SOFT_DECLINE",
"code": "ERROR",
"message": "<string>"
},
"transactions": [
{
"date": "2023-11-07T05:31:56Z",
"amount": 1,
"currencyCode": "<string>",
"transactionType": "SALE",
"processorTransactionId": "<string>",
"processorName": "<string>",
"processorMerchantId": "<string>",
"processorStatus": "PENDING",
"processorStatusReason": {
"type": "APPLICATION_ERROR",
"declineType": "SOFT_DECLINE",
"code": "ERROR",
"message": "<string>"
}
}
]
}
}'
{
"eventType": "PAYMENT.STATUS",
"date": "2021-02-21T15:36:16.367687",
"notificationConfig": {
"id": "cc51f9f0-7e1c-492b-9d37-f83a818f6070",
"description": "Payment webhook"
},
"signedAt": "1689221338",
"version": "2.1",
"payment": {
"id": "DdRZ6YY0",
"date": "2022-01-01T12:12:12.000000",
"amount": 3000,
"currencyCode": "GBP",
"customerId": "cust-123",
"orderId": "order-123",
"status": "SETTLED",
"paymentMethod": {
"paymentType": "FIRST_PAYMENT",
"paymentMethodToken": "-lcWjvBAAs2DnIRXwxNjUzNTYzNjIy",
"analyticsId": "LUi5pETUaVsdSEamK25L",
"paymentMethodType": "PAYMENT_CARD",
"paymentMethodData": {
"last4Digits": "1111",
"expirationMonth": "03",
"expirationYear": "2030",
"cardholderName": "ADYEN",
"network": "Visa",
"isNetworkTokenized": false,
"binData": {
"network": "VISA",
"issuerCountryCode": "US",
"issuerName": "JPMORGAN CHASE BANK, N.A.",
"regionalRestriction": "UNKNOWN",
"accountNumberType": "UNKNOWN",
"accountFundingType": "UNKNOWN",
"prepaidReloadableIndicator": "NOT_APPLICABLE",
"productUsageType": "UNKNOWN",
"productCode": "UNKNOWN",
"productName": "UNKNOWN"
}
},
"threeDSecureAuthentication": {
"responseCode": "NOT_PERFORMED"
}
},
"processor": {
"name": "STRIPE",
"processorMerchantId": "acct_1GORasdasqNWFwi8c",
"amountCaptured": 3000,
"amountRefunded": 0
},
"transactions": [
{
"date": "2022-05-26T11:14:11.946300",
"amount": 3000,
"currencyCode": "GBP",
"transactionType": "SALE",
"processorTransactionId": "pi_3L3edsGZasdasdc1iget38p",
"processorName": "STRIPE",
"processorMerchantId": "acct_1GORasvasdNWFwi8c",
"processorStatus": "SETTLED"
}
]
}
}
Return a 200 status to indicate that the data was received successfully