It is possible to vault (store) a card or any other payment method that supports
vaulting by setting the store field in the request body to true.
curl -i -X POST "https://api.example.gr4vy.app/transactions" \
-H "Authorization: Bearer [JWT_TOKEN]" \
-H "Content-Type: application/json" \
-d '{
"amount": 1299,
"currency": "AUD",
"store": true
"payment_method": {
"method": "card",
"number": "4111111111111111",
"expiration_date": "11/25",
"security_code": "123"
}
}'
This eliminates the need to separately vault the payment method and then use it
to create a transaction.
Storing a redirect payment method requires us to redirect the user only once. This
would vault the payment method and process the transaction.