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
New gift card service
Adds a new gift card service by providing a custom name and a value for each of the required fields.
POST
/
gift-card-services
Copy
Ask AI
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.{gr4vy_id}.gr4vy.app/gift-card-services"
payload := strings.NewReader("{\n \"gift_card_service_definition_id\": \"qwikcilver-gift-card\",\n \"display_name\": \"Qwikcilver UK\",\n \"fields\": [\n {\n \"key\": \"private_key\",\n \"value\": \"pk_26PHem9AhJZvU623DfE1x4sd\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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
{
"type": "gift-card-service",
"id": "6c020bf3-179b-4f4f-858d-84e39e196e0f",
"merchant_account_id": "default",
"gift_card_service_definition_id": "qwikcilver-gift-card",
"display_name": "Qwikcilver UK",
"active": true,
"fields": [
{
"key": "secret_key",
"value": "sk_test_26PHem9AhJZvU623DfE1x4sd"
}
],
"created_at": "2012-12-12T10:53:43+00:00",
"updated_at": "2012-12-12T10:53:43+00:00"
}
This endpoint requires the gift-card-services.write
scope.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Request body for activating a gift card service.
Response
201
application/json
Returns the created gift card service.
An configured gift card service.
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/gift-card-services"
payload := strings.NewReader("{\n \"gift_card_service_definition_id\": \"qwikcilver-gift-card\",\n \"display_name\": \"Qwikcilver UK\",\n \"fields\": [\n {\n \"key\": \"private_key\",\n \"value\": \"pk_26PHem9AhJZvU623DfE1x4sd\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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
{
"type": "gift-card-service",
"id": "6c020bf3-179b-4f4f-858d-84e39e196e0f",
"merchant_account_id": "default",
"gift_card_service_definition_id": "qwikcilver-gift-card",
"display_name": "Qwikcilver UK",
"active": true,
"fields": [
{
"key": "secret_key",
"value": "sk_test_26PHem9AhJZvU623DfE1x4sd"
}
],
"created_at": "2012-12-12T10:53:43+00:00",
"updated_at": "2012-12-12T10:53:43+00:00"
}
Assistant
Responses are generated using AI and may contain mistakes.