# Update a gift card debit

Source: https://developers.swell.is/backend-api/gift-card-debits/update-a-gift-card-debit

Update an existing gift card debit using the ID that was returned when created.

## Arguments

- `id` (objectId, required): Unique identifier for the gift card debit.
- `currency` (string)
- `amount` (currency)

## Example request

`PUT /giftcards:debits/:id`

**cURL**

```sh
$ curl https://api.swell.store/giftcards:debits/62ced9a991f00e001279a07e \
  -u store-id:secret-key \
  -d currency=JPY \
  -X PUT
```

**Node**

```javascript
const { swell } = require('swell-node');
swell.init('store-id', 'secret-key');

await swell.put('/giftcards:debits/{id}', {
  id: '62ced9a991f00e001279a07e',
  currency: 'JPY'
});
```

**PHP**

```php
<?php $swell = new \Swell\Client('store-id', 'secret-key');

$swell->put('/giftcards:debits/{id}', [
  'id' => '62ced9a991f00e001279a07e',
  'currency' => 'JPY'
]);
```

## Example response

```json
{
  "parent_id": "5fd21b2b53c2be21778d1f7e",
  "payment_id": "5fd21b5353c2be21778d3293",
  "amount": 35,
  "currency": "USD",
  "date_created": "2020-12-10T12:57:55.651Z",
  "id": "5fd21b5353c2be21778d337d"
}
```
