comecerodocs

Retrieve payment response data

GET
/payments/{payment_id}/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.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

payment_id*string

The id of the payment.

Query Parameters

show?string

Comma-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?string

Comma-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.

Response Body

The response data.

application/json
  1. 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?string

The object type, by payment method type.

Value in"payment.response_data.credit_card""payment.response_data.paypal""payment.response_data.amazon_pay""payment.response_data.apple_pay""payment.response_data.stripe"
url?string

The full URL of the response data.

Formaturi
avs_match?boolean

Card 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?boolean

Card 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?string

Card only, PayPal card gateway. PayPal's order id. Only present when set. Not returned to a limited token.

gateway_error_debug_id?string

Card 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).

Formaturi
next_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?boolean

PayPal 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?boolean

Amazon 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.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/payments/string/response_data'
Example Response
{  "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}