Test payment method events

On a test account, it is possible to manually trigger and test customer payment method events. Please be aware that the token of a tokenized card is only active for one hour. Therefore, it is good practice to ensure you create a new payment method before triggering a notification. There are three types of events that can be triggered by the endpoints described on this page:

  • customer_payment_method_updated,
  • customer_payment_method_failed,
  • customer_payment_method_reactivated.

Get started

  1. Make sure that EMV Tokenization is activated on your card agreement on the test account.

  2. Save a new payment method.

  3. Make sure the saved payment method has been tokenized - can easily be verified by looking for the scheme tokenized icon next to the card type icon.

  4. Configure webhooks and enable the relevant event types.

Trigger customer payment method updated event

Use the id on the saved payment method as card_id in the data object described below. last_four, exp_month and exp_year are all optional. If not provided, values will be generated.

curl -X POST \
  --url https://emv-token-api.reepay.com/v1/payment_method/metadata_update \
  -u 'priv_xxxx:' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "last_four": "2222",
  "card_id": "ca_5b35044a65605f19bac0b6d3bd034bb7",
  "exp_month": 12,
  "exp_year": 35
}'

Trigger customer payment method failed event

Use the id on the saved payment method as card_id in the data object described below. Acceptable values as status: suspended or deleted.

curl -X POST \
  --url https://emv-token-api.reepay.com/v1/payment_method/status_update \
  -u 'priv_xxxx:' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "status": "suspended",
  "card_id": "ca_afc23ca43047b4012e227ca4a9c41c14"
}'

Trigger customer payment method activated

Use the id on the saved payment method as card_id in the data object described below. Acceptable values as status: active.

curl -X POST \
  --url https://emv-token-api.reepay.com/v1/payment_method/status_update \
  -u 'priv_xxxx:' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "status": "active",
  "card_id": "ca_afc23ca43047b4012e227ca4a9c41c14"
}'