Skip to content

Payments

Retrieve a payment

Returns a payment of your store.

GET/v1/payments/{payment_id}

Requires the payments:read scope.

If the payment is still pending, the gateway is asked for the outcome (at most every 15 seconds), so a payer coming back from the payment page always sees the truth even if their browser never reached us. A payment of another store, or of the other environment (sandbox vs live), answers 404.

curl https://api.rais.app/v1/payments/5b1c2f4e-9d3a-4c61-8a7e-0f2d6b9e1a33 \
  -H "Authorization: Bearer rais_sk_test_..."
Response200
{
  "id": "5b1c2f4e-9d3a-4c61-8a7e-0f2d6b9e1a33",
  "object": "payment",
  "status": "pending",
  "amount": 500000,
  "currency": "DZD",
  "description": "Order #1042",
  "reference": "order-1042",
  "customer": {
    "id": null,
    "name": "Amina Benali",
    "email": "amina@example.dz",
    "phone": "+213550000000"
  },
  "items": [
    {
      "name": "Running shoes",
      "description": null,
      "quantity": 2,
      "unit_amount": 250000
    }
  ],
  "metadata": {
    "cart_id": "c_8812"
  },
  "livemode": false,
  "payment_page": "rais",
  "checkout_url": "https://pay.rais.app/pay/5b1c2f4e-9d3a-4c61-8a7e-0f2d6b9e1a33",
  "success_url": "https://shop.example/thanks",
  "cancel_url": "https://shop.example/cart",
  "expires_at": 1793003600,
  "created": 1793000000,
  "paid_at": null,
  "amount_refunded": 0,
  "refunded": false,
  "fees": null,
  "net": null,
  "receipt_url": null,
  "failure": null,
  "payment_method": null,
  "processor": {
    "name": "satim",
    "order_id": "V721uPPfNNofVQAAABL3",
    "approval_code": null,
    "response_code": null
  }
}

Request

Path parameters

payment_idstringrequired

The id of the payment.

Response

200The payment.

Returns the Payment object.

Errors

StatusCodeExample message
401invalid_api_keyInvalid API key provided.
403insufficient_scopeThis API key does not have the 'payments:write' permission.
403account_disabledThis store is suspended or disabled.
403live_mode_not_enabledComplete business verification to take live payments.
404payment_not_foundNo such payment.
429rate_limit_exceededToo many requests. Slow down and retry after the delay in the Retry-After header.
500internal_errorSomething went wrong on our side. Quote the request id to support.

Every error has the same envelope. See Errors.