curl -X POST https://api.swervpay.co/api/v1/cards \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "user",
"currency": "USD",
"provider": "MASTERCARD",
"amount": 10,
"type": "DEFAULT"
}'
import { SwervpayClient } from '@swervpaydev/sdk';
const config = {
secretKey: "<SECRET_KEY>",
businessId: "<BUSINESS_ID>"
}
const swervpay = new SwervpayClient(config);
await swervpay.card.create({
customer_id: "user",
currency: "USD",
provider: "MASTERCARD",
amount: 10,
type: "DEFAULT"
})
use Swervpaydev\SDK\Swervpay;
$config = [
'business_id' => '<BUSINESS_ID>',
'secret_key' => '<SECRET_KEY>'
];
$client = new Swervpay($config);
$client->card()->create([
"customer_id" => "user",
"currency" => "USD",
"provider" => "MASTERCARD",
"amount" => 10,
"type" => "DEFAULT"
]);
package main
import (
"context"
"fmt"
"github.com/swerv-ltd/swervpay-go"
"log"
)
func main() {
ctx := context.Background()
client := swervpay.NewSwervpayClient(&swervpay.SwervpayClientOption{
BusinessID: "<BUSINESS_ID>",
SecretKey: "<SECRET_KEY>",
})
data := swervpay.CreateCardBody{
Type: "DEFAULT",
Currency: "USD",
Provider: "MASTERCARD",
CustomerId: "user",
Amount: 10
}
resp, err := client.Card.Create(ctx, data)
if err != nil {
log.Fatal("error", err.Error())
return
}
}
{
"card_id": "<string>",
"message": "<string>"
}{
"message": "<string>",
"values": {}
}{
"message": "<string>",
"values": {}
}{
"message": "<string>",
"values": {}
}Cards
Create Card
Create card
POST
/
cards
curl -X POST https://api.swervpay.co/api/v1/cards \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "user",
"currency": "USD",
"provider": "MASTERCARD",
"amount": 10,
"type": "DEFAULT"
}'
import { SwervpayClient } from '@swervpaydev/sdk';
const config = {
secretKey: "<SECRET_KEY>",
businessId: "<BUSINESS_ID>"
}
const swervpay = new SwervpayClient(config);
await swervpay.card.create({
customer_id: "user",
currency: "USD",
provider: "MASTERCARD",
amount: 10,
type: "DEFAULT"
})
use Swervpaydev\SDK\Swervpay;
$config = [
'business_id' => '<BUSINESS_ID>',
'secret_key' => '<SECRET_KEY>'
];
$client = new Swervpay($config);
$client->card()->create([
"customer_id" => "user",
"currency" => "USD",
"provider" => "MASTERCARD",
"amount" => 10,
"type" => "DEFAULT"
]);
package main
import (
"context"
"fmt"
"github.com/swerv-ltd/swervpay-go"
"log"
)
func main() {
ctx := context.Background()
client := swervpay.NewSwervpayClient(&swervpay.SwervpayClientOption{
BusinessID: "<BUSINESS_ID>",
SecretKey: "<SECRET_KEY>",
})
data := swervpay.CreateCardBody{
Type: "DEFAULT",
Currency: "USD",
Provider: "MASTERCARD",
CustomerId: "user",
Amount: 10
}
resp, err := client.Card.Create(ctx, data)
if err != nil {
log.Fatal("error", err.Error())
return
}
}
{
"card_id": "<string>",
"message": "<string>"
}{
"message": "<string>",
"values": {}
}{
"message": "<string>",
"values": {}
}{
"message": "<string>",
"values": {}
}curl -X POST https://api.swervpay.co/api/v1/cards \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "user",
"currency": "USD",
"provider": "MASTERCARD",
"amount": 10,
"type": "DEFAULT"
}'
import { SwervpayClient } from '@swervpaydev/sdk';
const config = {
secretKey: "<SECRET_KEY>",
businessId: "<BUSINESS_ID>"
}
const swervpay = new SwervpayClient(config);
await swervpay.card.create({
customer_id: "user",
currency: "USD",
provider: "MASTERCARD",
amount: 10,
type: "DEFAULT"
})
use Swervpaydev\SDK\Swervpay;
$config = [
'business_id' => '<BUSINESS_ID>',
'secret_key' => '<SECRET_KEY>'
];
$client = new Swervpay($config);
$client->card()->create([
"customer_id" => "user",
"currency" => "USD",
"provider" => "MASTERCARD",
"amount" => 10,
"type" => "DEFAULT"
]);
package main
import (
"context"
"fmt"
"github.com/swerv-ltd/swervpay-go"
"log"
)
func main() {
ctx := context.Background()
client := swervpay.NewSwervpayClient(&swervpay.SwervpayClientOption{
BusinessID: "<BUSINESS_ID>",
SecretKey: "<SECRET_KEY>",
})
data := swervpay.CreateCardBody{
Type: "DEFAULT",
Currency: "USD",
Provider: "MASTERCARD",
CustomerId: "user",
Amount: 10
}
resp, err := client.Card.Create(ctx, data)
if err != nil {
log.Fatal("error", err.Error())
return
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Was this page helpful?
⌘I