Retrieve payment response data
Returns what the gateway sent back for the payment, by payment method type. For an initiated payment it holds the shopper's next step: a redirect_url (PayPal approval, or a 3-D Secure page), a next_action for a Comecero Express Payments 3-D Secure check on your own page, or the Stripe.js values for a stripe payment. For a card it holds the address and security code results (not for a limited token). Any token type may call it; a limited token only for a payment it is bound to.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
payment_id*stringThe id of the payment.
show?stringComma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
hide?stringComma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.
The response data.
application/json- response
What the gateway sent back for a payment, by payment method type. For an initiated payment this is where the next step is: redirect_url (send the shopper there), next_action (run the Comecero Express Payments 3-D Secure check on your own page) or, for stripe, the Stripe.js values to confirm with. When the shopper is back, get the payment and commit it only while it is still initiated: the Comecero 3-D Secure page commits the payment itself. Wallet, ACH and store credit payments return an empty object.
object?stringThe object type, by payment method type.
"payment.response_data.credit_card""payment.response_data.paypal""payment.response_data.amazon_pay""payment.response_data.apple_pay""payment.response_data.stripe"url?stringThe full URL of the response data.
uriavs_match?booleanCard only. True when the address check passed. Not returned to a limited token.
avs_code?|Card only. The gateway's address check code. Not returned to a limited token.
avs_message?|Card only. The address check message. Not returned to a limited token.
cvv_match?booleanCard only. True when the security code check passed. Not returned to a limited token.
cvv_code?|Card only. The gateway's security code check code. Not returned to a limited token.
cvv_message?|Card only. The security code check message. Not returned to a limited token.
gateway_order_id?stringCard only, PayPal card gateway. PayPal's order id. Only present when set. Not returned to a limited token.
gateway_error_debug_id?stringCard only, PayPal card gateway. PayPal's debug id of the last failed call, for PayPal support. Only present when set. Not returned to a limited token.
three_ds_liability_shift?|Card only. The 3-D Secure liability shift result. Only present after a 3-D Secure check. Not returned to a limited token.
three_ds_enrollment_status?|Card only. The 3-D Secure enrollment status. Only present after a 3-D Secure check. Not returned to a limited token.
three_ds_authentication_status?|Card only. The 3-D Secure authentication status. Only present after a 3-D Secure check. Not returned to a limited token.
redirect_url?|For a card payment, only present while a 3-D Secure check is waiting: the Comecero-hosted check page, or the gateway's own page (PayPal card). For PayPal, the page where the buyer approves, also when a commit asks the buyer to approve a changed total. Send the shopper there. The Comecero-hosted check page commits the payment itself when the check ends. So when the shopper is back, get the payment and call POST /payments/{payment_id}/commit only while it is still initiated (PayPal and the PayPal card page always need it).
urinext_action?Card only, only present while a Comecero Express Payments 3-D Secure check is waiting. Lets your own page run the check with Stripe.js (handleNextAction with client_secret) instead of following redirect_url. Then get the payment and call POST /payments/{payment_id}/commit only while it is still initiated.
billing_agreement_accept_status?booleanPayPal only. True when the buyer accepted a billing agreement for later payments.
charge_id?|Amazon Pay only. Amazon's charge id.
charge_permission_id?|Amazon Pay only. Amazon's charge permission id.
refund_id?|Amazon Pay only. Amazon's refund id, if any.
committed?booleanAmazon Pay only. True once the payment was committed.
eligible_payment_method_types?array<string>|Stripe only. The methods the shopper can pay with on this payment.
client_secret?|Stripe only. The client secret to confirm the payment with in Stripe.js. Returned while the payment is initiated, processing or pending.
publishable_key?|Stripe only. The key to load Stripe.js with. Same rule as client_secret.
stripe_account?|Stripe only. The account to pass to Stripe.js. Same rule as client_secret.
api_version?|Stripe only. The API version for Stripe.js, when needed. Same rule as client_secret.
betas?|Stripe only. The betas value for Stripe.js, when needed. Same rule as client_secret.
selected_payment_method?|Stripe only. The method the shopper paid with, once known.
curl -X GET 'https://api.comecero.com/api/v1/payments/string/response_data'{ "object": "payment.response_data.credit_card", "url": "https://api.comecero.com/api/v1/payments/0090460891496PyrYzd9DC/response_data", "avs_match": true, "avs_code": "M", "avs_message": null, "cvv_match": true, "cvv_code": "M", "cvv_message": null}Refund a payment POST
Gives money back on a captured payment, in full or in part. Money moves back to the shopper's payment method and refund events fire. Secret and trusted tokens that may create refunds only; a limited token gets `403`.
Void a payment POST
Cancels a `pending` payment (authorized but not captured), so the hold on the shopper's money is released. Any other status is `422`. The payment becomes `cancelled` and the `payment:voided` event fires. Any body is ignored. To give back money that was captured, refund the payment instead. Secret and trusted tokens only; a limited token gets `403`.