Skip to content

Add Card (from hosted token)

POST
/api/account/memberships/{memberId}/payment-methods/from-token
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 }'
memberId
required
string format: uuid
object
accountId
string format: uuid
memberId
string format: uuid
providerToken
required
string
>= 1 characters
isDefault
boolean
nullable
Example generated
{
"accountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"memberId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"providerToken": "example",
"isDefault": true
}

OK

Media type application/json
object
id
string format: uuid
merchantId
string format: uuid
memberId
string format: uuid
type
string
Allowed values: Card BankAccount
brand
string
nullable
last4
string
nullable
expiryMonth
integer format: int32
nullable
expiryYear
integer format: int32
nullable
accountName
string
nullable
bsb
string
nullable
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
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties
Example generated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}