> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.senjaropay.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.senjaropay.com/_mcp/server.

# Get card payment status

POST https://api.senjaropay.com/senjaropay/merchant/card/status
Content-Type: application/json

Reads the latest card payment state by reference. Use this when a webhook
is delayed, missed, or fails verification. This call does not create a charge.


Reference: https://docs.senjaropay.com/api-documentation/card-payments/get-card-payment-status

## Authentication

- `x-api-key` header (required) — API Key authentication via header
- `x-api-secret` header (required) — API Key authentication via header

## Request

### Body (application/json)

This endpoint expects a CardStatusRequest.

- `reference` (string, required) — data.reference from the card pay response.

## Response

### 200

Payment status

- `status` (string, required)
- `code` (integer, required)
- `data` (CardStatusResponseData, required)

## Errors

### 400 Bad Request Error

Validation error

- `status` (string, optional)
- `code` (integer, optional)
- `error_code` (string, optional)
- `message` (string, optional)

### 401 Unauthorized Error

Unauthorized

- `status` (string, optional)
- `code` (integer, optional)
- `error_code` (string, optional)
- `message` (string, optional)

## Types

### CardStatusResponseData

- `object` (string, optional)
- `payment_type` (string, optional)
- `reference` (string, optional)
- `status` (string, optional)
- `amount` (CardAmount, optional)
- `provider_status` (string, optional, nullable) — Raw status from the card processor. Null until the processor reports a result.
- `created_at` (datetime, optional)
- `updated_at` (datetime, optional)

### CardAmount

- `currency` (string, optional)
- `value` (integer, optional)

## Examples

**Request**

```json
{
  "reference": "CARD-8LBDCZ6Q6XZS"
}
```

**Response**

```json
{
  "status": "success",
  "code": 200,
  "data": {
    "object": "payment",
    "payment_type": "card",
    "reference": "CARD-8LBDCZ6Q6XZS",
    "status": "pending",
    "amount": {
      "currency": "TZS",
      "value": 1000
    },
    "provider_status": null,
    "created_at": "2026-09-28T07:39:17.000Z",
    "updated_at": "2026-09-28T07:39:17.000Z"
  }
}
```

**SDK Code**

```python card_getCardPaymentStatus_example
import requests

url = "https://api.senjaropay.com/senjaropay/merchant/card/status"

payload = { "reference": "CARD-8LBDCZ6Q6XZS" }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript card_getCardPaymentStatus_example
const url = 'https://api.senjaropay.com/senjaropay/merchant/card/status';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"reference":"CARD-8LBDCZ6Q6XZS"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go card_getCardPaymentStatus_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.senjaropay.com/senjaropay/merchant/card/status"

	payload := strings.NewReader("{\n  \"reference\": \"CARD-8LBDCZ6Q6XZS\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby card_getCardPaymentStatus_example
require 'uri'
require 'net/http'

url = URI("https://api.senjaropay.com/senjaropay/merchant/card/status")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"reference\": \"CARD-8LBDCZ6Q6XZS\"\n}"

response = http.request(request)
puts response.read_body
```

```java card_getCardPaymentStatus_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.senjaropay.com/senjaropay/merchant/card/status")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"reference\": \"CARD-8LBDCZ6Q6XZS\"\n}")
  .asString();
```

```php card_getCardPaymentStatus_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.senjaropay.com/senjaropay/merchant/card/status', [
  'body' => '{
  "reference": "CARD-8LBDCZ6Q6XZS"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp card_getCardPaymentStatus_example
using RestSharp;

var client = new RestClient("https://api.senjaropay.com/senjaropay/merchant/card/status");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"reference\": \"CARD-8LBDCZ6Q6XZS\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift card_getCardPaymentStatus_example
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["reference": "CARD-8LBDCZ6Q6XZS"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.senjaropay.com/senjaropay/merchant/card/status")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```