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."
Consumer API
Exchange Public Token
Initiate a Refund Transfer.
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."
header
body
The plaid public token that you will get from the frontend side when user select the payment method.
Response
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."