Provision payment service token
Tokenize stored card against a payment service.
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.
"46973e9d-88a7-44a6-abfe-be4ff0134ff4"
Body
Request body for provision a payment service token.
The ID of the payment service.
"a7d6b829-aea5-407d-ab7f-138784b5ad2c"
The redirect URL to redirect a buyer to after they have authorized their payment method. This only applies to payment methods that require buyer approval.
"https://example.com/callback"
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.
3 - 4
"123"
Response
A payment service token.
The type of this resource.
payment-service-token
"payment-service-token"
The unique ID of the token.
"d6ad71d5-6908-45d6-ab65-39c55475dd08"
The unique ID of the payment method.
"9bdc4bc4-005e-4658-8eee-a309fc43cd4d"
The unique ID of the payment service.
"50f2e61f-caac-4e12-8d79-30eaf8250423"
The state of the token.
processing
- The payment method is still being stored.buyer_approval_required
- Storing the payment method requires the buyer to provide approval. Follow theapproval_url
for next steps.succeeded
- The payment method is approved and stored with all relevant payment services.failed
- Storing the payment method did not succeed.
processing
, buyer_approval_required
, succeeded
, failed
"succeeded"
The optional URL that the buyer needs to be redirected to to further authorize their payment.
"https://api.example.app.gr4vy.com/payment-methods/f4fb0dd1-4ff9-46fb-965e-11de34aa6806/approve"
The token value. Will be present if succeeded.
The date and time when this token was first created in our system.
"2021-01-01T12:34:00.000+00:00"
The date and time when this token was last updated in our system.
"2021-01-01T12:34:00.000+00:00"
Was this page helpful?