Provision network token
/payment-methods/{payment_method_id}/network-tokens
curl --request POST \
--url https://api.sandbox.{gr4vy_id}.gr4vy.app/payment-methods/{payment_method_id}/network-tokens \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"is_subsequent_payment": true,
"merchant_initiated": false
}'
{
"created_at": "2021-01-01T12:34:00.000+00:00",
"expiration_date": "01/30",
"id": "d6ad71d5-6908-45d6-ab65-39c55475dd08",
"payment_method_id": "9bdc4bc4-005e-4658-8eee-a309fc43cd4d",
"status": "active",
"token": "string",
"type": "network-token",
"updated_at": "2021-01-01T12:34:00.000+00:00"
}
This endpoint requires the payment-methods.write
scope.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
The ID of the payment method.
Body
Defines if the request is a subsequent of another request or not.
Defines if the request is merchant initiated or not.
The 3 or 4 digit security code often found on the card. This often referred to as the CVV or CVD.
The security code can only be set if the stored payment method represents a card.
Response
The date and time when this network token was first created in our system.
The expiration date for the network token.
The unique ID of the token.
The unique ID of the payment method.
The state of the network token.
active
- The network token is active and ready to be used.inactive
- The network token is being deactivated.suspended
- The network token is suspended.deleted
- The network token is deleted.
active
, inactive
, suspended
, deleted
The value of the network token.
The type of this resource.
network-token
The date and time when this network token was last updated in our system.
curl --request POST \
--url https://api.sandbox.{gr4vy_id}.gr4vy.app/payment-methods/{payment_method_id}/network-tokens \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"is_subsequent_payment": true,
"merchant_initiated": false
}'
{
"created_at": "2021-01-01T12:34:00.000+00:00",
"expiration_date": "01/30",
"id": "d6ad71d5-6908-45d6-ab65-39c55475dd08",
"payment_method_id": "9bdc4bc4-005e-4658-8eee-a309fc43cd4d",
"status": "active",
"token": "string",
"type": "network-token",
"updated_at": "2021-01-01T12:34:00.000+00:00"
}