/

20 minute read

September 23, 2020

Webhooks Management

Webhooks are notifications about API events, sent as they occur. The Marqeta platform sends these notifications to an endpoint hosted in your environment and configured to receive and process them. See the About Webhooks developer guide for more information.

Create a webhook object to represent your webhook endpoint. Configure it with the URL of your webhook endpoint and a set of credentials for accessing that endpoint. You can configure it to send notifications for a single event, a group of events by type, or all event types. To set up multiple webhook endpoints and route different types of event notifications to each, create multiple webhook objects and configure each to send a specific type of event notification to a specific endpoint.

Create webhook

Action: POST
Endpoint: /webhooks

Develop Now!

Sign in and use your sandbox to access the API Explorer

Creates a webhook.

Body field details (request)

Fields Description

token

string
Optional

Unique identifier of the webhook.

If you do not include a token, the system automatically generates one. This token is necessary for use in other API calls. It is recommended that, rather than let the system, you create a simple, easy-to-remember string. This value cannot be updated.

Allowable Values:

36 char max

name

string
Required

Descriptive name of the webhook.

Allowable Values:

64 char max

active

boolean
Optional

Indicates whether the webhook is active.

Allowable Values:

true, false

Default value:
true

config

object
Required

Contains the configuration information for the webhook.

Allowable Values:

events

array of strings
Required

Specifies the types of events for which notifications are sent.

Allowable Values:

For a comprehensive list of events, see Event Types.

The config object (request)

Fields Description

url

string
Required

URL of your webhook endpoint.

Allowable Values:

  • 255 char max

  • Must be HTTPS

  • Empty string not allowed

secret

string
Optional

A randomly chosen string used for implementing HMAC-SHA1.

HMAC-SHA1 provides an added layer of security by authenticating the message and validating message integrity. Using this functionality requires that your webhook endpoint verify the message signature. For information about implementing this functionality, see Signature Verification.

Allowable Values:

  • 20-50 characters

  • Must contain at least one numeral

  • Must contain at least one lowercase letter

  • Must contain at least one uppercase letter

  • Must contain at least one of these symbols: @#$%!^&*()\_+~`-=[]{},;:'",./<>?

basic_auth_username

string
Required

Username for accessing your webhook endpoint.

Allowable Values:

50 char max

basic_auth_password

string
Required

Password for accessing your webhook endpoint.

Allowable Values:

  • 20-100 characters

  • Must contain at least one numeral

  • Must contain at least one lowercase letter

  • Must contain at least one uppercase letter

  • Must contain at least one of these symbols: @#$%!^&*()\_+~`-=[]{},;:'",./<>?

custom_header

object
Optional

Contains information about the webhook’s custom HTTP headers for outgoing calls.

Allowable Values:

The config.custom_header object (request)

Fields Description

my_header_name_1
my_header_name_2
my_header_name_3

string
Optional

Additional information included in the HTTP header for webhook notifications. For example, this might contain security information, along with Basic Authentication, when making a JIT Funding request.

You can define the name and value of up to three headers, as shown below:

"custom_header": {
  "my_header_name_1": "my_value_1",
  "my_header_name_2": "my_value_2",
  "my_header_name_3": "my_value_3"
}

Is this helpful?

Allowable Values:

  • Up to three name-value pairs

  • 500 char max per name

  • 500 char max per value

Body field details (response)

Fields Description

token

string
Returned

Unique identifier of the webhook.

If you did not include a token in your request, the system automatically generated one. This token is necessary for use in other API calls. This value cannot be updated.

Allowable Values:

36 char max

name

string
Returned

Descriptive name of the webhook.

Allowable Values:

64 char max

active

boolean
Conditionally returned

Indicates whether the webhook is active. This field is returned if you included it in your webhook.

Allowable Values:

true, false

config

object
Returned

Contains the configuration information for the webhook.

Allowable Values:

events

array of strings
Returned

Specifies the types of events for which notifications are sent.

Allowable Values:

For a comprehensive list of events, see Event Types.

created_time

datetime
Returned

Time when the webhook event was created.

Allowable Values:

Valid timestamp

last_modified_time

datetime
Returned

Time when the associated object was last modified.

Allowable Values:

Valid timestamp

The config object (response)

Fields Description

url

string
Returned

URL of your webhook endpoint.

Allowable Values:

  • 255 char max

  • Must be HTTPS

  • Empty string not allowed

secret

string
Conditionally returned

A randomly chosen string used for implementing HMAC-SHA1.

HMAC-SHA1 provides an added layer of security by authenticating the message and validating message integrity. Using this functionality requires that your webhook endpoint verify the message signature. For information about implementing this functionality, see Signature Verification.

Allowable Values:

  • 20-50 characters

  • Must contain at least one numeral

  • Must contain at least one lowercase letter

  • Must contain at least one uppercase letter

  • Must contain at least one of these symbols: @#$%!^&*()\_+~`-=[]{},;:'",./<>?

basic_auth_username

string
Returned

Username for accessing your webhook endpoint.

Allowable Values:

50 char max

basic_auth_password

string
Returned

Password for accessing your webhook endpoint.

Allowable Values:

  • 20-100 characters

  • Must contain at least one numeral

  • Must contain at least one lowercase letter

  • Must contain at least one uppercase letter

  • Must contain at least one of these symbols: @#$%!^&*()\_+~`-=[]{},;:'",./<>?

custom_header

object
Conditionally returned

Contains information about the webhook’s custom HTTP headers for outgoing calls. This object is returned if you included it in your config object.

Allowable Values:

The config.custom_header object (response)

Fields Description

my_header_name_1
my_header_name_2
my_header_name_3

string
Conditionally returned

Additional customizable information included in the HTTP header. This string is returned if you included it in your config.custom_header object.

Allowable Values:

  • Up to three name-value pairs

  • 500 char max per name

  • 500 char max per value

Sample request body

{
  "token": "my_webhook_token",
  "active": true,
  "events": [
    "*"
  ],
  "config": {
    "url": "https://my_secure_domain.com/webhook",
    "secret": "My_20-character-min_secret",
    "basic_auth_username": "my_username",
    "basic_auth_password": "My_20-character-min_password"
    "custom_header": {
      "my_header_name_1": "my_value_1",
      "my_header_name_2": "my_value_2"
    }
  },
  "name": "My_Webhook_Name"
}

Is this helpful?

Sample response body

{
  "name": "My_Webhook_Name",
  "active": true,
  "config": {
    "url": "https://my_secure_domain.com/webhook",
    "secret": "My_20-character-min_secret",
    "basic_auth_username": "my_username",
    "basic_auth_password": "My_20-character-min_password"
    "custom_header": {
      "my_header_name_1": "my_value_1",
      "my_header_name_2": "my_value_2"
    }
  },
  "events": [
    "*"
  ],
  "token": "my_webhook_token",
  "created_time": "2020-03-24T23:20:28Z",
  "last_modified_time": "2020-03-24T23:20:28Z"
}

Is this helpful?

Retrieve webhook

Action: GET
Endpoint: /webhooks/{token}

Develop Now!

Sign in and use your sandbox to access the API Explorer

Retrieves a webhook.

URL path parameters (request)

Fields Description

token

string
Required

Identifies the webhook to retrieve.

Allowable Values:

Existing webhook token.

Send a GET request to /webhooks to retrieve webhook tokens.

Body field details (response)

Fields Description

token

string
Returned

Identifies the webhook to retrieve.

If you did not include a token in your request, the system automatically generated one. This token is necessary for use in other API calls. This value cannot be updated.

Allowable Values:

Existing webhook token.

name

string
Returned

Descriptive name of the webhook.

Allowable Values:

64 char max

active

boolean
Conditionally returned

Indicates whether the webhook is active. This field is returned if you included it in your webhook object.

Allowable Values:

true, false

config

object
Returned

Contains the configuration information for the webhook.

Allowable Values:

events

array of strings
Returned

Specifies the types of events for which notifications are sent.

Allowable Values:

For a comprehensive list of events, see Event Types.

created_time

datetime
Returned

Time when the webhook event was created.

Allowable Values:

Valid timestamp

last_modified_time

datetime
Returned

Time when the associated object was last modified.

Allowable Values:

Valid timestamp

Sample response body

{
  "name": "My_Webhook_Name",
  "active": true,
  "config": {
    "url": "https://my_secure_domain.com/webhook",
    "secret": "My_20-character-min_secret",
    "basic_auth_username": "my_username",
    "basic_auth_password": "My_20-character-min_password"
  },
  "events": [
    "*"
  ],
  "token": "my_webhook_token",
  "created_time": "2020-03-24T23:20:28Z",
  "last_modified_time": "2020-03-24T23:20:28Z"
}

Is this helpful?

Update webhook

Action: PUT
Endpoint: /webhooks/{token}

Develop Now!

Sign in and use your sandbox to access the API Explorer

Updates a webhook.

URL path parameters (request)

Fields Description

token

string
Required

Identifies the webhook to update.

Allowable Values:

Existing webhook token.

Send a GET request to /webhooks to retrieve webhook tokens.

Body field details (request)

Fields Description

name

string
Required

Descriptive name of the webhook.

Allowable Values:

64 char max

active

boolean
Optional

Indicates whether the webhook is active.

Allowable Values:

true, false

Default value:
true

config

object
Required

Contains the configuration information for the webhook.

Allowable Values:

events

array of strings
Required

Specifies the types of events for which notifications are sent.

Allowable Values:

For a comprehensive list of events, see Event Types.

The config object (request)

Fields Description

url

string
Required

URL of your webhook endpoint.

Allowable Values:

  • 255 char max

  • Must be HTTPS

  • Empty string not allowed

secret

string
Optional

A randomly chosen string used for implementing HMAC-SHA1.

HMAC-SHA1 provides an added layer of security by authenticating the message and validating message integrity. Using this functionality requires that your webhook endpoint verify the message signature. For information about implementing this functionality, see Signature Verification.

Allowable Values:

  • 20-50 characters

  • Must contain at least one numeral

  • Must contain at least one lowercase letter

  • Must contain at least one uppercase letter

  • Must contain at least one of these symbols: @#$%!^&*()\_+~`-=[]{},;:'",./<>?

basic_auth_username

string
Required

Username for accessing your webhook endpoint.

Allowable Values:

50 char max

basic_auth_password

string
Required

Password for accessing your webhook endpoint.

Allowable Values:

  • 20-100 characters

  • Must contain at least one numeral

  • Must contain at least one lowercase letter

  • Must contain at least one uppercase letter

  • Must contain at least one of these symbols: @#$%!^&*()\_+~`-=[]{},;:'",./<>?

custom_header

object
Optional

Contains information about the webhook’s custom HTTP headers for outgoing calls.

Allowable Values:

The config.custom_header object (request)

Fields Description

my_header_name_1
my_header_name_2
my_header_name_3

Additional information included in the HTTP header for webhook notifications. For example, this might contain security information, along with Basic Authentication, when making a JIT Funding request.

You can define the name and value of up to three headers, as shown below:

"custom_header": {
  "my_header_name_1": "my_value_1",
  "my_header_name_2": "my_value_2",
  "my_header_name_3": "my_value_3"
}

Is this helpful?

Allowable Values:

  • Up to three name-value pairs

  • 500 char max per name

  • 500 char max per value

Body field details (response)

Fields Description

token

string
Returned

Unique identifier of the webhook.

If you did not include a token in your request, the system automatically generated one. This token is necessary for use in other API calls. This value cannot be updated.

Allowable Values:

36 char max

name

string
Returned

Descriptive name of the webhook.

Allowable Values:

64 char max

active

boolean
Conditionally returned

Indicates whether the webhook is active. This field is returned if you included it in your webhook object.

Allowable Values:

true, false

config

object
Returned

Contains the configuration information for the webhook.

Allowable Values:

events

array of strings
Returned

Specifies the types of events for which notifications are sent.

Allowable Values:

For a comprehensive list of events, see Event Types.

created_time

datetime
Returned

Time when the webhook event was created.

Allowable Values:

Valid timestamp

last_modified_time

datetime
Returned

Time when the associated object was last modified.

Allowable Values:

Valid timestamp

The config object (response)

Fields Description

url

string
Returned

URL of your webhook endpoint.

Allowable Values:

  • 255 char max

  • Must be HTTPS

  • Empty string not allowed

secret

string
Conditionally returned

A randomly chosen string used for implementing HMAC-SHA1.

HMAC-SHA1 provides an added layer of security by authenticating the message and validating message integrity. Using this functionality requires that your webhook endpoint verify the message signature. For information about implementing this functionality, see Signature Verification.

Allowable Values:

  • 20-50 characters

  • Must contain at least one numeral

  • Must contain at least one lowercase letter

  • Must contain at least one uppercase letter

  • Must contain at least one of these symbols: @#$%!^&*()\_+~`-=[]{},;:'",./<>?

basic_auth_username

string
Returned

Username for accessing your webhook endpoint.

Allowable Values:

50 char max

basic_auth_password

string
Returned

Password for accessing your webhook endpoint.

Allowable Values:

  • 20-100 characters

  • Must contain at least one numeral

  • Must contain at least one lowercase letter

  • Must contain at least one uppercase letter

  • Must contain at least one of these symbols: @#$%!^&*()\_+~`-=[]{},;:'",./<>?

custom_header

object
Conditionally returned

Contains information about the webhook’s custom HTTP headers for outgoing calls. This object is returned if you included it in your config object.

Allowable Values:

The config.custom_header object (response)

Fields Description

my_header_name_1
my_header_name_2
my_header_name_3

Additional customizable information included in the HTTP header. This string is returned if you included it in your config.custom_header object.

Allowable Values:

  • Up to three name-value pairs

  • 500 char max per name

  • 500 char max per value

Sample request body

{
  "events": [
    "transaction.*"
  ]
}

Is this helpful?

Sample response body

{
  "name": "My_Webhook_Name",
  "active": true,
  "config": {
    "url": "https://my_secure_domain.com/webhook",
    "secret": "My_20-character-min_secret",
    "basic_auth_username": "my_username",
    "basic_auth_password": "My_20-character-min_password"
  },
  "events": [
    "transaction.*"
  ],
  "token": "my_webhook_token",
  "created_time": "2020-03-24T23:20:28Z",
  "last_modified_time": "2020-03-24T23:20:28Z"
}

Is this helpful?

Update webhook custom headers

Action: PUT
Endpoint: /webhooks/customheaders/{token}

Develop Now!

Sign in and use your sandbox to access the API Explorer

Adds or updates a webhook’s custom HTTP headers.

URL path parameters (request)

Fields Description

token

string
Required

Identifies the webhook whose custom HTTP headers you want to update.

Allowable Values:

Existing webhook token.

Send a GET request to /webhooks to retrieve webhook tokens.

Body field details (request)

Fields Description

custom_header

object
Required

Contains information about the webhook’s custom HTTP headers for outgoing calls.

Allowable Values:

The config.custom_header object (request)

Fields Description

my_header_name_1
my_header_name_2
my_header_name_3

Additional information included in the HTTP header for webhook notifications. For example, this might contain security information, along with Basic Authentication, when making a JIT Funding request.

You can define the name and value of up to three headers, as shown below:

"custom_header": {
  "my_header_name_1": "my_value_1",
  "my_header_name_2": "my_value_2",
  "my_header_name_3": "my_value_3"
}

Is this helpful?

Allowable Values:

  • Up to three name-value pairs

  • 500 char max per name

  • 500 char max per value

Body field details (response)

Fields Description

token

string
Returned

Unique identifier of the webhook.

If you did not include a token in your request, the system automatically generated one. This token is necessary for use in other API calls. This value cannot be updated.

Allowable Values:

36 char max

name

string
Returned

Descriptive name of the webhook.

Allowable Values:

64 char max

active

boolean
Conditionally returned

Indicates whether the webhook is active. This field is returned if you included it in your webhook object.

Allowable Values:

true, false

Default value:
true

config

object
Returned

Contains the configuration information for the webhook.

Allowable Values:

events

array of strings
Returned

Specifies the types of events for which notifications are sent.

Allowable Values:

For a comprehensive list of events, see Event Types.

created_time

datetime
Returned

Time when the webhook event was created.

Allowable Values:

Valid timestamp

last_modified_time

datetime
Returned

Time when the associated object was last modified.

Allowable Values:

Valid timestamp

The config object (response)

Fields Description

url

string
Returned

URL of your webhook endpoint.

Allowable Values:

  • 255 char max

  • Must be HTTPS

  • Empty string not allowed

secret

string
Optional

A randomly chosen string used for implementing HMAC-SHA1.

HMAC-SHA1 provides an added layer of security by authenticating the message and validating message integrity. Using this functionality requires that your webhook endpoint verify the message signature. For information about implementing this functionality, see Signature Verification.

Allowable Values:

  • 20-50 characters

  • Must contain at least one numeral

  • Must contain at least one lowercase letter

  • Must contain at least one uppercase letter

  • Must contain at least one of these symbols: @#$%!^&*()\_+~`-=[]{},;:'",./<>?

basic_auth_username

string
Required

Username for accessing your webhook endpoint.

Allowable Values:

50 char max

basic_auth_password

string
Required

Password for accessing your webhook endpoint.

Allowable Values:

  • 20-100 characters

  • Must contain at least one numeral

  • Must contain at least one lowercase letter

  • Must contain at least one uppercase letter

  • Must contain at least one of these symbols: @#$%!^&*()\_+~`-=[]{},;:'",./<>?

custom_header

object
Returned

Contains information about the webhook’s custom HTTP headers for outgoing calls. This object is returned if you included it in your config object.

Allowable Values:

The config.custom_header object (response)

Fields Description

my_header_name_1
my_header_name_2
my_header_name_3

Additional customizable information included in the HTTP header. This string is returned if you included it in your config.custom_header object.

Allowable Values:

  • Up to three name-value pairs

  • 500 char max per name

  • 500 char max per value

Sample request body

{
  "custom_header": {
    "my_header_name_1": "my_value_1",
    "my_header_name_2": "my_value_2",
    "my_header_name_3": "my_value_3"
  }
}

Is this helpful?

Sample response body

{
  "token": "fd87c24f-c780-4f78-859c-480c59ba144d",
  "name": "My_Webhook_Name",
  "active": true,
  "config": {
    "url": "https://my_secure_domain.com/webhook",
    "secret": "My_20-character-min_secret",
    "basic_auth_username": "my_username",
    "basic_auth_password": "My_20-character-min_password",
    "custom_header": {
      "my_header_name_1": "my_value_1",
      "my_header_name_2": "my_value_2",
      "my_header_name_3": "my_value_3"
    }
  },
  "events": [
    "transaction.*"
  ],
  "created_time": "2020-03-06T08:12:32Z",
  "last_modified_time": "2020-03-26T22:07:23Z"
}

Is this helpful?

List webhooks

Action: GET
Endpoint: /webhooks

Develop Now!

Sign in and use your sandbox to access the API Explorer

Returns an array of all webhooks.

This endpoint supports field filtering, sorting, and pagination.

Sample response body

{
  "count": 1,
  "start_index": 0,
  "end_index": 0,
  "is_more": true,
  "data": [
    {
      "name": "My_Webhook_Name",
      "active": true,
      "config": {
        "url": "https://my_secure_domain.com/webhook",
        "secret": "My_20-character-min_secret",
        "basic_auth_username": "my_username",
        "basic_auth_password": "My_20-character-min_password",
        "custom_header": {
          "my_header_name_1": "my_value_1",
          "my_header_name_2": "my_value_2",
          "my_header_name_3": "my_value_3"
        }
      },
      "events": [
        "*"
      ],
      "token": "my_webhook_token",
      "created_time": "2020-03-24T23:20:28Z",
      "last_modified_time": "2020-03-24T23:20:28Z"
    }
  ]
}

Is this helpful?

Ping webhook

Action: POST
Endpoint: /webhooks/{token}/ping

Develop Now!

Sign in and use your sandbox to access the API Explorer

Pings webhook endpoint.

Send a ping request to your webhook endpoint to validate credentials and connectivity. Your webhook endpoint must be configured to respond.

Configuring your webhook endpoint

This subsection describes the ping request that your webhook endpoint should expect and its expected response.

When the Marqeta platform receives the ping request, it sends a POST request containing the following body to the URL of your webhook endpoint:

{
  "pings": [
    {
      "token": "marqeta",
      "payload": "healthcheck"
    }
  ]
}

Is this helpful?

To indicate that it is functioning properly, your webhook endpoint must respond with a status code of "200" (see Signature Verification for a code example that identifies a ping request). The response can optionally include a JSON-formatted body, for example:

{"my_endpoint_status": "alive"}

Is this helpful?

The Marqeta platform then responds to its requestor by echoing, as-is, the response code and body received from your webhook endpoint.

Using the ping facility

To ping a webhook endpoint, send a POST request to /webhooks/{token}/ping and use the token path parameter to specify the webhook to ping. Include an empty, JSON-formatted body in the request, that is:

{}

Is this helpful?

The following chain of actions occurs during a successful ping:

  1. The Marqeta platform receives the ping request (POST to /webhooks/{token}/ping).

  2. The Marqeta platform sends a request to your webhook endpoint.

  3. Your webhook endpoint responds with a status code of "200" and an optional body.

  4. The Marqeta platform responds to its requestor by echoing, as-is, the response code and body received from your webhook endpoint.

Note
If the customer-hosted endpoint fails to respond within five seconds, the Marqeta platform times out the request and responds with the following message body (where <optional message> is an optional message):
{
  "error_message" : "Webhook operation failed " + <optional message>,
  "error_code" : "422600"
}

Is this helpful?

Failed pings are not automatically retried.

Sample request body

{}

Is this helpful?

Sample response body

{"my_endpoint_status": "alive"}

Is this helpful?

Resend event notification

Action: POST
Endpoint: /webhooks/{token}/{event_type}/{event_token}

Develop Now!

Sign in and use your sandbox to access the API Explorer

Resends an event notification to your webhook endpoint.

Although you send this request as a POST, all parameters are on the URL and the body is empty. The event notification is resent to your webhook endpoint and also returned in the response to this request.

URL path parameters

Fields Description

token

string
Required

The token identifying the webhook object that is configured to send event notifications to your webhook endpoint.

Allowable Values:

Existing webhook token.

Send a GET request to /webhooks to retrieve webhook tokens.

event_type

string
Required

Specifies the type of event you want to resend.

Allowable Values:

usertransition, businesstransition, cardtransition, transaction, digitalwallettokentransition, chargebacktransition, commandomodetransition, casetransition, directdeposittransition

event_token

string
Required

The token identifying the event for which you want to resend a notification.

Allowable Values:

Existing event token.

  • Send a GET request to /usertransitions/user/{token} to retrieve transition tokens related to a particular user.

  • Send a GET request to /businesstransitions/business/{token} to retrieve transition tokens related to a particular business.

  • Send a GET request to /cardtransitions/card/{card_token} to retrieve transition tokens related to a particular card.

  • Send a GET request to /transactions to retrieve transaction tokens.

  • Send a GET request to /digitalwallettokentransitions/digitalwallettoken/{token} to retrieve transition tokens related to a particular digital wallet token.

  • Send a GET request to /commandomodes/{commandomode_token}/transitions to retrieve Commando Mode transition tokens related to a particular Commando Mode control set.

  • Send a GET request to /cases/{token}/transitions to retrieve case transition tokens related to a particular case.

  • Send a GET request to /directdeposit/transitions/{token} to retrieve a transition related to a particular direct deposit account.

Sample response bodies

The following sample response body shows a successful resend of an event notification.

{
  "transactions": [
    {
      "type": "authorization",
      "state": "PENDING",
      "token": "90d143e4-1051-46ab-a9ce-2a931d990e95",
      "user_token": "99f323d4-298f-4b0c-93b1-19b2d9921eb8",
      "acting_user_token": "99f323d4-298f-4b0c-93b1-19b2d9921eb8",
      "card_token": "a039902f-2fb9-468b-ac23-fce2be690e37",
      "gpa": {
        "currency_code": "USD",
        "ledger_balance": 20,
        "available_balance": 0,
        "credit_balance": 0,
        "pending_credits": 0,
        "impacted_amount": -10,
        "balances": {
          "USD": {
            "currency_code": "USD",
            "ledger_balance": 20,
            "available_balance": 0,
            "credit_balance": 0,
            "pending_credits": 0,
            "impacted_amount": -10
          }
        }
      },
      "gpa_order": {
        "token": "15127077-fde3-4442-8304-c73daff9ace0",
        "amount": 10,
        "created_time": "2019-08-21T18:17:13Z",
        "last_modified_time": "2019-08-21T18:17:13Z",
        "transaction_token": "2c4adb00-a07a-4424-9470-cc4dcbc3c04f",
        "state": "PENDING",
        "response": {
          "code": "0000",
          "memo": "Approved or completed successfully"
        },
        "funding": {
          "amount": 10,
          "source": {
            "type": "program",
            "token": "**********b4c2",
            "active": true,
            "name": "PFS for simulating transactions",
            "is_default_account": false,
            "created_time": "2019-07-10T00:09:35Z",
            "last_modified_time": "2019-07-10T00:09:35Z"
          }
        },
        "funding_source_token": "**********b4c2",
        "user_token": "99f323d4-298f-4b0c-93b1-19b2d9921eb8",
        "currency_code": "USD"
      },
      "duration": 159,
      "created_time": "2019-08-21T18:17:13Z",
      "user_transaction_time": "2019-08-21T18:17:13Z",
      "settlement_date": "2019-08-21T00:00:00Z",
      "request_amount": 10,
      "amount": 10,
      "issuer_interchange_amount": 0,
      "currency_code": "USD",
      "approval_code": "013419",
      "response": {
        "code": "0000",
        "memo": "Approved or completed successfully"
      },
      "network": "VISA",
      "subnetwork": "VISANET",
      "acquirer_fee_amount": 0,
      "acquirer": {
        "institution_country": "840",
        "institution_id_code": "375321467",
        "retrieval_reference_number": "526051868288",
        "system_trace_audit_number": "676127"
      },
      "user": {
        "metadata": {}
      },
      "card": {
        "metadata": {}
      },
      "card_security_code_verification": {
        "type": "CVV1",
        "response": {
          "code": "0000",
          "memo": "Card security code match"
        }
      },
      "fraud": {
        "network": {
          "transaction_risk_score": 86,
          "account_risk_score": 2
        }
      },
      "card_acceptor": {
        "mid": "000000000011111",
        "mcc": "6411",
        "name": "Chicken Tooth Music",
        "street_address": "111 Main St",
        "city": "Berkeley",
        "country_code": "USA"
      },
      "pos": {
        "pan_entry_mode": "MAG_STRIPE",
        "pin_entry_mode": "TRUE",
        "terminal_id": "TR100000",
        "terminal_attendance": "ATTENDED",
        "card_holder_presence": false,
        "card_presence": false,
        "partial_approval_capable": false,
        "purchase_amount_only": false,
        "is_recurring": false
      },
      "transaction_metadata": {
        "payment_channel": "OTHER"
      }
    }
  ]
}

Is this helpful?

An incorrectly entered card number with a BIN prefix coincidentally associated with your program can return failure codes such as those shown in the following response:

{
  "transactions": [
    {
      "type": "authorization",
      "state": "DECLINED",
      "token": "7cf6db10-5d3a-43f8-aa56-ab21ee23f254",
      "duration": 27,
      "created_time": "2019-06-03T08:11:22Z",
      "user_transaction_time": "2019-06-03T08:11:22Z",
      "settlement_date": "2019-06-03T00:00:00Z",
      "request_amount": 0.01,
      "amount": 0.01,
      "currency_conversion": {
        "network": {
          "original_amount": 0.02,
          "conversion_rate": 0.5000000,
          "original_currency_code": "124"
        }
      },
      "currency_code": "USD",
      "response": {
        "code": "1011",
        "memo": "Card not found"
      },
      "network": "VISA",
      "subnetwork": "VISANET",
      "acquirer_fee_amount": 0,
      "acquirer": {
        "institution_country": "124",
        "institution_id_code": "406449",
        "retrieval_reference_number": "915408301475",
        "system_trace_audit_number": "301475"
      },
      "fraud": {
        "network": {
          "transaction_risk_score": 23
        }
      },
      "issuer_received_time": "2019-06-03T08:11:22.215Z",
      "issuer_payment_node": "baa462ac7d5e36143bdd21df49d95af8",
      "card_acceptor": {
        "mid": "000000000011111",
        "mcc": "6411",
        "name": "Chicken Tooth Music",
        "city": "Berkeley",
        "country_code": "USA"
      },
      "pos": {
        "pan_entry_mode": "MANUAL",
        "pin_entry_mode": "FALSE",
        "terminal_id": "TR100000",
        "terminal_attendance": "UNSPECIFIED",
        "card_holder_presence": false,
        "card_presence": false,
        "card_data_input_capability": "NO_TERMINAL",
        "partial_approval_capable": false,
        "purchase_amount_only": false,
        "is_recurring": false
      },
      "transaction_metadata": {
        "payment_channel": "ECOMMERCE"
      }
    }
  ]
}

Is this helpful?

Have any feedback on this page?

If you feel we can do anything better, please let our team know.

We strive for the best possible developer experience.