This endpoint returns a JWE public key which you can use to encrypt a JSON payload containing user and card information. You'll have 15 seconds to send a request to this endpoint after receiving the AUTHENTICATED webhook.

Building the JWE

You can encrypt the payload you'll provide to the Switch a Card (JWE) endpoint using your JWE public key. The JWE specifications are the following:

  1. RSA 2048 certificate in JWK format
  2. RSA-OAEP-256 as key encryption algorithm
  3. A256GCM as content encryption algorithm

The JWE value should be a JSON string with the following structure:

{
    "user": {
        "name": {
            "first_name": "John",
            "last_name": "Smith"
        },
        "address": {
            "street": "348 WEST 57TH STREET",
            "street2": "#367",
            "city": "NEW YORK",
            "region": "NY",
            "postal_code": "10019",
            "country": "US"
        },
        "phone_number": "+14155550123"
    },
    "card": {
        "number": "4242424242424242",
        "expiration": "08/2025",
        "cvv": "012"
    }
}

📘

Card expiration date format

MM/YYYY and MM/YY are both accepted formats.

Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!