# Testing creating / complete payment endpoint in Postman

**URL:** https://community.rapyd.net/t/testing-creating-complete-payment-endpoint-in-postman/58835
**Category:** ⚙️ API
**Created:** [August 19, 2023, 10:45am UTC](https://community.rapyd.net/t/testing-creating-complete-payment-endpoint-in-postman/58835 "2023-08-19T10:45:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![xyz](https://avatars.discourse-cdn.com/v4/letter/x/b5a626/32.png) [@xyz](https://community.rapyd.net/u/xyz)
#### Post date: [August 19, 2023, 10:45am UTC](https://community.rapyd.net/t/testing-creating-complete-payment-endpoint-in-postman/58835/1 "2023-08-19T10:45:19Z")

</div>

Hello there,

I’m having an issue testing the create / complete payment endpoint, I’m passing in test details and setting the idempotency correctly in the headers but still this error occurs 🙂.

How I set idempotency:

```auto
const idempotency = new Date().getTime().toString()
pm.environment.set("rapyd_idempotency", idempotency)

```

```auto
{
  "message": "The request tried to update a payment, but the status of the payment does not allow updates. The request was rejected. Corrective action: None. Determine why an attempt was made to change the payment when the 'status' was not 'ACT'.",
        "response_code": "ERROR_UPDATE_PAYMENT",
}

```

 ![Screenshot 2023-08-19 at 11.39.16 AM](https://us1.discourse-cdn.com/flex016/uploads/rapyd/original/3X/2/9/29cceee1522349b30aa70f1181a3f0eab8e5f0bf.png)

Also I’m making use of the Sandbox api url and it’s secret and access keys.

---

<div class="post-metadata">

### Author: ![Community\_Team](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@Community\_Team](https://community.rapyd.net/u/Community_Team)
#### Post date: [August 21, 2023, 4:57pm UTC](https://community.rapyd.net/t/testing-creating-complete-payment-endpoint-in-postman/58835/2 "2023-08-21T16:57:38Z")

</div>

Thanks @xyz, I see you are trying to complete a payment. Is this a `bank_redirect` or `bank_transfer` type of payment?

I am noticing the status of your payment is not `ACT` (active) so it must be already `CLO` (closed)

> **[Complete Payment | Rapyd Docs](https://docs.rapyd.net/en/complete-payment-363014.html)**
>
> Liberate global commerce with all the tools you need for payments, payouts, and business everywhere.
