POST
/
api
/
consumers
/
checkout
/
{checkout_id}
/
exchange_public_token
/
curl --location --request POST 'http://127.0.0.1:8000/api/consumers/checkout/{checkout_id}/exchange_public_token/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--header 'link-token: <link-token>' \
--data-raw '{ \
    "public_token": "plaid_public_token" \
    "plaid_account_id":"plaid_account_id" \
}' 

  "message": "payment method saved successfully."
  
checkout_id
string
The checkout ID that the merchant received in response to the POST Checkout request.
Authorization
string
The authentication token that you will get in the success response on ‘verify_user’ api.
The Merchant User Token is received as a response to an generate_link_token API call.

body

public_token
string
The plaid public token that you will get from the frontend side when user select the payment method.
plaid_account_id
string
The plaid_account_id you will get from frontend side when user select the payment method.

Response

success
number
On success response it will display “payment method saved successfull”, and status code 200.
curl --location --request POST 'http://127.0.0.1:8000/api/consumers/checkout/{checkout_id}/exchange_public_token/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token <token>' \
--header 'link-token: <link-token>' \
--data-raw '{ \
    "public_token": "plaid_public_token" \
    "plaid_account_id":"plaid_account_id" \
}' 

  "message": "payment method saved successfully."