Invoice
PATCH
/invoices/{id}Update
Auto-added to mirror backend route PATCH /invoices/:id. Headers cloned from a sibling; body/params are placeholders.
Request
Example
curl -X PATCH 'https://api.paycose.com/api/v1/app1/platform/wallet/invoices/{{id}}' \
-H 'X-Session-Token: {{session_token}}' \
-H 'X-Country: {{country}}' \
-H 'X-Test-Mode: {{x_test_mode}}' \
-d '{
"line_items": [
{
"product_id": "<string>",
"price_id": "<string>",
"quantity": 0,
"tax_rates": [
"<string>"
]
}
],
"enable_shipping": false,
"account_tax_ids": [
"<string>"
],
"payment_method_types": [
"<string>"
],
"payment_method_providers": [
"<string>"
],
"default_tax_rates": [
"<string>"
],
"metadata": {},
"description": "<string>",
"footer": "<string>",
"due_date": "<RFC3339 timestamp>",
"collection_method": "<string>",
"capture_method": "<string>",
"auto_advance": false,
"default_payment_method": {
"id": "<string>",
"type": "<string>"
},
"coupon": "<string>",
"shipping_address": {
"address_type": "<string>",
"name": "<string>",
"phone": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"shipping_rate_id": "<string>",
"labels": [
"<string>"
]
}'Headers
| Name | Value | Description |
|---|---|---|
| X-Session-Token | {{session_token}} | |
| X-Country | {{country}} | |
| X-Test-Mode | {{x_test_mode}} | true=wallet_test, false=wallet_live (default). Toggle the x_test_mode collection variable to flip every applicable request. |
Body
| Name | Type | Value |
|---|---|---|
| line_items | array | [1] |
| enable_shipping | boolean | false |
| account_tax_ids | array | [1] |
| payment_method_types | array | [1] |
| payment_method_providers | array | [1] |
| default_tax_rates | array | [1] |
| metadata | object | {…} |
| description | string | <string> |
| footer | string | <string> |
| due_date | string | <RFC3339 timestamp> |
| collection_method | string | <string> |
| capture_method | string | <string> |
| auto_advance | boolean | false |
| default_payment_method | object | {…} |
| coupon | string | <string> |
| shipping_address | object | {…} |
| shipping_rate_id | string | <string> |
| labels | array | [1] |
{
"line_items": [
{
"product_id": "<string>",
"price_id": "<string>",
"quantity": 0,
"tax_rates": [
"<string>"
]
}
],
"enable_shipping": false,
"account_tax_ids": [
"<string>"
],
"payment_method_types": [
"<string>"
],
"payment_method_providers": [
"<string>"
],
"default_tax_rates": [
"<string>"
],
"metadata": {},
"description": "<string>",
"footer": "<string>",
"due_date": "<RFC3339 timestamp>",
"collection_method": "<string>",
"capture_method": "<string>",
"auto_advance": false,
"default_payment_method": {
"id": "<string>",
"type": "<string>"
},
"coupon": "<string>",
"shipping_address": {
"address_type": "<string>",
"name": "<string>",
"phone": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"shipping_rate_id": "<string>",
"labels": [
"<string>"
]
}Responses
200200 OK
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
Body
{
"id": "<string>",
"object": "<string>",
"livemode": false,
"created_at": "<RFC3339 timestamp>",
"updated_at": "<RFC3339 timestamp>",
"number": "<string>",
"quote_id": "<string>",
"subscription_id": "<string>",
"test_clock_id": "<string>",
"customer_id": "<string>",
"default_payment_method_id": "<string>",
"payment_method_type": "<string>",
"collection_method": "<string>",
"capture_method": "<string>",
"amount_capturable": 0,
"auto_advance": false,
"due_date": "<RFC3339 timestamp>",
"description": "<string>",
"footer": "<string>",
"customer_name": "<string>",
"customer_email": "<string>",
"customer_phone": "<string>",
"address": {
"id": "<string>",
"address_type": "<string>",
"name": "<string>",
"phone": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"line_items": [
{
"id": "<string>",
"object": "<string>",
"product_id": "<string>",
"product_price_id": "<string>",
"sort_order": 0,
"type": "<string>",
"description": "<string>",
"product_name": "<string>",
"product_description": "<string>",
"product_image": "<string>",
"product_type": "<string>",
"unit_amount": 0,
"quantity": 0,
"amount_discount": 0,
"amount_subtotal": 0,
"amount_tax": 0,
"amount_total": 0,
"currency": "<string>",
"discountable": false,
"proration": false,
"period_start": "<RFC3339 timestamp>",
"period_end": "<RFC3339 timestamp>",
"reference_id": "<string>",
"metadata": {},
"taxes": [
{
"id": "<string>",
"tax_rate_id": "<string>",
"taxable_amount": 0,
"tax_amount": 0,
"inclusive": false
}
]
}
],
"discounts": [
{
"id": "<string>",
"coupon_id": "<string>",
"promotion_code_id": "<string>",
"name": "<string>",
"amount": 0
}
],
"shipping_details": {
"address": {
"id": "<string>",
"address_type": "<string>",
"name": "<string>",
"phone": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"rate": {
"id": "<string>",
"display_name": "<string>",
"type": "<string>",
"currency": "<string>",
"amount": 0
}
},
"subtotal": 0,
"tax": 0,
"total": 0,
"amount_shipping": 0,
"amount_discount": 0,
"amount_due": 0,
"amount_paid": 0,
"amount_remaining": 0,
"starting_balance": 0,
"currency": "<string>",
"scaling_factor": 0,
"transfer_data": {
"destination": "<string>",
"balance_id": "<string>"
},
"status": "<string>",
"paid": false,
"paid_out_of_band": false,
"attempted": false,
"attempt_count": 0,
"next_payment_attempt": "<RFC3339 timestamp>",
"payment_intent": "<string>",
"last_finalization_error": {},
"status_transitions": {
"finalized_at": 0,
"paid_at": 0,
"voided_at": 0,
"marked_uncollectible_at": 0
},
"provider": "<string>",
"reference_id": "<string>",
"payments": [
{
"id": "<string>",
"object": "<string>",
"livemode": false,
"created_at": "<RFC3339 timestamp>",
"invoice": "<string>",
"status": "<string>",
"amount_requested": 0,
"amount_paid": 0,
"currency": "<string>",
"is_default": false,
"payment": {
"type": "<string>",
"payment_intent": "<string>",
"charge": "<string>"
}
}
],
"hosted_invoice_url": "<string>",
"invoice_pdf": "<string>",
"receipt_id": "<string>",
"metadata": {},
"labels": "<core.Labels>",
"account_tax_ids": [
"<string>"
],
"payment_method_types": [
"<string>"
],
"payment_method_providers": [
"<string>"
],
"customer": {
"id": "<string>",
"object": "<string>",
"livemode": false,
"created_at": null,
"updated_at": null,
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"shipping": {
"name": "<string>",
"phone": "<string>",
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
}
},
"is_system": false,
"is_application_customer": false,
"capabilities": {
"charge": false,
"transfer": false,
"payout": false
},
"tax_ids": [
{
"type": "<string>",
"value": "<string>",
"country": "<string>",
"verification_status": "<string>"
}
],
"metadata": {},
"labels": "<core.Labels>",
"invoice_settings": {},
"tax_exempt": "<string>",
"preferred_locales": [
"<string>"
],
"business_name": "<string>",
"currency": "<string>"
},
"billing_details": {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"business_name": "<string>",
"tax_id": {
"type": "<string>",
"value": "<string>"
}
},
"default_payment_method": {
"id": "<string>",
"object": "<string>",
"livemode": false,
"created_at": null,
"updated_at": null,
"customer_id": "<string>",
"card_holder_name": "<string>",
"last4": "<string>",
"fingerprint": "<string>",
"exp_month": 0,
"exp_year": 0,
"type": "<string>",
"brand": "<string>",
"card": {
"brand": "<string>",
"issuer": "<string>",
"last4": "<string>",
"exp_month": 0,
"exp_year": 0
},
"billing_details": {},
"allow_redisplay": "<string>",
"reference_id": "<string>",
"provider": "<string>",
"metadata": {},
"labels": "<core.Labels>",
"customer": {
"id": "<string>",
"object": "<string>",
"livemode": false,
"created_at": null,
"updated_at": null,
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
},
"shipping": {
"name": "<string>",
"phone": "<string>",
"address": {
"city": "<string>",
"country": "<string>",
"line1": "<string>",
"line2": "<string>",
"postal_code": "<string>",
"state": "<string>"
}
},
"is_system": false,
"is_application_customer": false,
"capabilities": {
"charge": false,
"transfer": false,
"payout": false
},
"tax_ids": [
{
"type": "<string>",
"value": "<string>",
"country": "<string>",
"verification_status": "<string>"
}
],
"metadata": {},
"labels": "<core.Labels>",
"invoice_settings": {},
"tax_exempt": "<string>",
"preferred_locales": [
"<string>"
],
"business_name": "<string>",
"currency": "<string>"
},
"provider_connection_status": "<string>",
"needs_recollection": false
},
"quote": null,
"subscription": null
}400400 Bad Request
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
Body
{
"object": "error",
"code": "<string>",
"key": "<string>",
"i18n_key": "<string>",
"message": "<string>",
"request_id": "<string>"
}500500 Internal Server Error
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
Body
{
"object": "error",
"code": "<string>",
"key": "<string>",
"i18n_key": "<string>",
"message": "<string>",
"request_id": "<string>"
}