Introduction
Transactions
Buyers
Checkout Sessions
Payment links
Payment options
Refunds
Settlement records
Instruments
- Card schemes
- Card details
- Digital wallets
- Gift cards
- Payment methods
- Payment method definitions
Vault
- Account updater
- Network tokens
- Payment service tokens
- Vault Forward
- Vault Forward endpoints
- Vault Forward authentication
Connections
- All services
- Payment services
- Digital wallets
- Anti-fraud services
- Gift-card services
Other
- Flow
- Merchant accounts
- Reports
- Report executions
- Webhook subscriptions
Update fields for checkout session
Updates the Secure Fields of the Checkout Session.
PUT
/
checkout
/
sessions
/
{checkout_session_id}
/
fields
Copy
Ask AI
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.{gr4vy_id}.gr4vy.app/checkout/sessions/{checkout_session_id}/fields"
payload := strings.NewReader("{\n \"payment_method\": {\n \"method\": \"card\",\n \"number\": \"4111111111111111\",\n \"expiration_date\": \"11/25\",\n \"security_code\": \"123\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Copy
Ask AI
This response does not have an example.
This endpoint requires the checkout-sessions.write
scope.
Path Parameters
The unique ID for a Checkout Session.
Example:
"8724fd24-5489-4a5d-90fd-0604df7d3b83"
Body
application/json
A request to update the secure fields of a checkout session.
Response
204
Returns when the Checkout Session was updated.
Was this page helpful?
Copy
Ask AI
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.{gr4vy_id}.gr4vy.app/checkout/sessions/{checkout_session_id}/fields"
payload := strings.NewReader("{\n \"payment_method\": {\n \"method\": \"card\",\n \"number\": \"4111111111111111\",\n \"expiration_date\": \"11/25\",\n \"security_code\": \"123\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Copy
Ask AI
This response does not have an example.
Assistant
Responses are generated using AI and may contain mistakes.