POST
/api/account/memberships/{memberId}/payment-methods/from-token
const url = 'https://example.com/api/account/memberships/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/payment-methods/from-token';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"accountId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","memberId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","providerToken":"example","isDefault":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/account/memberships/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/payment-methods/from-token \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "accountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "memberId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "providerToken": "example", "isDefault": true }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” memberId
required
string format: uuid
Request Body
Section titled “Request Body ”object
accountId
string format: uuid
memberId
string format: uuid
providerToken
required
string
isDefault
boolean
Example generated
{ "accountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "memberId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "providerToken": "example", "isDefault": true}object
accountId
string format: uuid
memberId
string format: uuid
providerToken
required
string
isDefault
boolean
Example generated
{ "accountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "memberId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "providerToken": "example", "isDefault": true}object
accountId
string format: uuid
memberId
string format: uuid
providerToken
required
string
isDefault
boolean
Example generated
{ "accountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "memberId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "providerToken": "example", "isDefault": true}Responses
Section titled “ Responses ”OK
Media type application/json
object
id
string format: uuid
merchantId
string format: uuid
memberId
string format: uuid
type
string
brand
string
last4
string
expiryMonth
integer format: int32
expiryYear
integer format: int32
accountName
string
bsb
string
isDefault
boolean
priority
integer format: int32
createdAt
string format: date-time
updatedAt
string format: date-time
Example
{ "type": "Card"}Not Found
Media type application/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}