curl -X GET https://api.swervpay.co/api/v1/bills/<BILL_ID> \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json"
import { SwervpayClient } from '@swervpaydev/sdk';
const config = {
secretKey: "<SECRET_KEY>",
businessId: "<BUSINESS_ID>"
}
const swervpay = new SwervpayClient(config);
await swervpay.bill.get("<BILL_ID>");
use Swervpaydev\SDK\Swervpay;
$config = [
'business_id' => '<BUSINESS_ID>',
'secret_key' => '<SECRET_KEY>'
];
$client = new Swervpay($config);
$client->bill()->get("<BILL_ID>")->toArray();
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>",
})
resp, err := client.Bill.Get(ctx, "<BILL_ID>")
if err != nil {
log.Fatal("error", err.Error())
return
}
}
{
"account_name": "<string>",
"account_number": "<string>",
"amount": 123,
"bank_code": "<string>",
"bank_name": "<string>",
"bill": {
"bill_code": "<string>",
"bill_name": "<string>",
"item_code": "<string>",
"name": "<string>",
"token": "<string>"
},
"category": "<string>",
"charges": 123,
"created_at": "2023-11-07T05:31:56Z",
"detail": "<string>",
"fiat_rate": 123,
"id": "<string>",
"imad": "<string>",
"payment_method": "<string>",
"reference": "<string>",
"report": true,
"report_message": "<string>",
"session_id": "<string>",
"status": "<string>",
"trace_number": "<string>",
"type": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"values": {}
}{
"message": "<string>",
"values": {}
}{
"message": "<string>",
"values": {}
}Bills
Get bill
Get bill
GET
/
bills
/
{id}
curl -X GET https://api.swervpay.co/api/v1/bills/<BILL_ID> \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json"
import { SwervpayClient } from '@swervpaydev/sdk';
const config = {
secretKey: "<SECRET_KEY>",
businessId: "<BUSINESS_ID>"
}
const swervpay = new SwervpayClient(config);
await swervpay.bill.get("<BILL_ID>");
use Swervpaydev\SDK\Swervpay;
$config = [
'business_id' => '<BUSINESS_ID>',
'secret_key' => '<SECRET_KEY>'
];
$client = new Swervpay($config);
$client->bill()->get("<BILL_ID>")->toArray();
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>",
})
resp, err := client.Bill.Get(ctx, "<BILL_ID>")
if err != nil {
log.Fatal("error", err.Error())
return
}
}
{
"account_name": "<string>",
"account_number": "<string>",
"amount": 123,
"bank_code": "<string>",
"bank_name": "<string>",
"bill": {
"bill_code": "<string>",
"bill_name": "<string>",
"item_code": "<string>",
"name": "<string>",
"token": "<string>"
},
"category": "<string>",
"charges": 123,
"created_at": "2023-11-07T05:31:56Z",
"detail": "<string>",
"fiat_rate": 123,
"id": "<string>",
"imad": "<string>",
"payment_method": "<string>",
"reference": "<string>",
"report": true,
"report_message": "<string>",
"session_id": "<string>",
"status": "<string>",
"trace_number": "<string>",
"type": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"values": {}
}{
"message": "<string>",
"values": {}
}{
"message": "<string>",
"values": {}
}curl -X GET https://api.swervpay.co/api/v1/bills/<BILL_ID> \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json"
import { SwervpayClient } from '@swervpaydev/sdk';
const config = {
secretKey: "<SECRET_KEY>",
businessId: "<BUSINESS_ID>"
}
const swervpay = new SwervpayClient(config);
await swervpay.bill.get("<BILL_ID>");
use Swervpaydev\SDK\Swervpay;
$config = [
'business_id' => '<BUSINESS_ID>',
'secret_key' => '<SECRET_KEY>'
];
$client = new Swervpay($config);
$client->bill()->get("<BILL_ID>")->toArray();
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>",
})
resp, err := client.Bill.Get(ctx, "<BILL_ID>")
if err != nil {
log.Fatal("error", err.Error())
return
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
OK
Show child attributes
Show child attributes
Was this page helpful?
⌘I